Closed Bug 1488411 Opened 6 years ago Closed 5 years ago

Navigation through about:policies pages via address bar is not possible if the about:policies page is already open

Categories

(Firefox :: Enterprise Policies, defect, P5)

63 Branch
defect

Tracking

()

VERIFIED FIXED
Firefox 66
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox61 --- unaffected
firefox62 --- unaffected
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- verified

People

(Reporter: emilghitta, Assigned: yushanlin96, Mentored)

References

Details

(Keywords: good-first-bug)

Attachments

(2 files)

Attached image AboutPoliciesSearch.gif
[Affected versions]:
Firefox 63.0a1 (BuildId:20180903220141)

[Affected platforms]:
Windows 10 64bit.
Ubuntu 16.04 64bit.
macOS 10.12.6

[Steps to reproduce]:
1. Launch Firefox.
2. Access the about:policies page.
3. Enter the following link inside the address bar and press enter: about:policies#documentation

[Expected result]:
The about:policies#documentation page is displayed.

[Actual result]:
The about:policies#active page is displayed.

[Notes]
For further information regarding this issue please observe the attached screencast.

It seems that the pages are not changed via address bar if the about:policies page is displayed inside the same tab (from where the search is performed).

This issue is reproducible with all about:policies pages.

Please note that if the about:policies page is not displayed (inside the tab from where the search is performed), the search for a certain about:policies page is successfully performed via address bar.

This may be an Edge case scenario since the users will, probably, navigate through about:policies pages through section links.
Mentor: felipc
Keywords: good-first-bug
Priority: -- → P5
Hi, I can reproduce the problem and I'd like to work on this bug if anyone can guide me through it.
Hi Yushan, do you have experience with web development? This bug will involve a bit of JS and event listeners.


First, to get started, you'll need to check out a copy of the Firefox source
code from Mercurial:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Source_Code/Mercurial)


Then you need to be set up the build environment to compile/build it. Since to
fix this bug it won't be necessary to recompile any binary components for
Firefox, I recommend setting up an artifact build which is much faster and
easier to use:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Artifact_builds
Hi Felipe,
I have Firefox built. I think I found a fix for the problem.
Assignee: nobody → yushanlin96
Status: NEW → ASSIGNED
When you've got a patch for it, you can attach the diff here in bugzilla, or you can submit it through Phabricator (https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html)

Feel free to describe the solution you've found here so I can advise if it's on the right path
In mozilla-central/browser/components/enterprisepolicies/content/aboutPolicies.js I added a window.onhashchange to check if the location hash of the url has been changed. If there is a change, the page will change based on the location hash that was given.
awesome, yeah! Just use addEventListener("hashchange", ...) instead of setting window.onhashchange = ..., as that's our preferred style
I attached the patch for this bug. Let me know if there's any changes needed!
Pushed by felipc@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/38bbecae8c62
Respond to hash changes in about:policies. r=felipe
Thanks for the patch, Yushan! Sorry for the delay, I had not noticed the patch in the bug, because usually when we attach a patch it's also expected to choose a reviewer, which will get notified about it.

Anyways, the patch looked good, so I just pushed it. Thanks for your contribution!
https://hg.mozilla.org/mozilla-central/rev/38bbecae8c62
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
I have reproduced this bug with Nightly 64.0a1 (2018-09-04) on Windows 7, 64 Bit!
This bug's fix is verified with latest Nightly!

Build ID 	20181228215042
User Agent 	Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Whiteboard: [bugday-20181226]
QA Whiteboard: [bugday-20181226]
Whiteboard: [bugday-20181226]

Thank you Mohammad for verifying this issue!

Marking this accordingly.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: