Closed
Bug 1486486
Opened 6 years ago
Closed 6 years ago
Jumping between processes in about:memory still changes the URL bar
Categories
(Toolkit :: about:memory, enhancement)
Toolkit
about:memory
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: n.nethercote)
Details
Attachments
(1 file)
1.56 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
The bits added in bug 929826 to override normal link behavior look like this: link.addEventListener("click", function(event) { document.documentElement.scrollTop = document.querySelector(event.target.href).offsetTop; event.preventDefault(); }); This doesn't work, because event.target.href is an absolute URI if event.target is an <a>. So this is passing strings like "about:memory#end0" to querySelector, which throws because that's not a valid selector. As a result, the default action happens. That said, fixing this to use getAttribute("href") causes scrolling to happen to not-quite-the-right-place, because the offsetTop of the element doesn't actually correspond to its viewport position, since the offsetParent's rect is not at the top-left of the viewport. So maybe this whole chunk should just be removed.
Reporter | ||
Updated•6 years ago
|
Flags: needinfo?(n.nethercote)
Assignee | ||
Comment 1•6 years ago
|
||
It's throwing because things like `about:memory#end0` aren't valid selectors.
Attachment #9005535 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•6 years ago
|
||
Thanks for identifying this. I agree that the behaviour obtained with this code gone is reasonable... given that it's the same behaviour as we currently get, minus the thrown exception :)
Flags: needinfo?(n.nethercote)
Reporter | ||
Comment 3•6 years ago
|
||
Comment on attachment 9005535 [details] [diff] [review] Remove bogus link override code in about:memory r=me
Attachment #9005535 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 4•6 years ago
|
||
Try looks good: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f235504faa6982909a0d8046218af57c49ddb519
Pushed by nnethercote@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d929a08b7cce Remove bogus link override code in about:memory. r=bz
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d929a08b7cce
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•