Closed
Bug 988102
Opened 10 years ago
Closed 10 years ago
Opening inspector scrolls the content page all the way to the top
Categories
(DevTools :: Inspector, defect, P1)
DevTools
Inspector
Tracking
(firefox30 verified, firefox31 verified)
VERIFIED
FIXED
Firefox 31
People
(Reporter: bgrins, Assigned: miker)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
2.43 KB,
patch
|
bgrins
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
STR: Open a page Scroll down a bit Open the inspector panel Notice that as the body gets highlighted the page gets scrolled to the top. The scroll position of the page should not change when devtools opens.
Reporter | ||
Comment 1•10 years ago
|
||
I'm guessing this is caused by the box model highlighter landing, in bug 663778.
Depends on: 663778
Reporter | ||
Updated•10 years ago
|
Priority: -- → P1
Reporter | ||
Comment 2•10 years ago
|
||
The "inspector-open" selection is being ignored as expected, but a "nodeselected" selection is firing immediately after this, causing the default node to get highlighted (and scrolled into view). The comment in _shouldNewSelectionBeHighlighted indicates that we shouldn't be highlighting at all in this case. Relevant code is https://mxr.mozilla.org/mozilla-central/source/browser/devtools/markupview/markup-view.js#275 and https://mxr.mozilla.org/mozilla-central/source/browser/devtools/markupview/markup-view.js#285.
Reporter | ||
Updated•10 years ago
|
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Reporter | ||
Comment 3•10 years ago
|
||
Mike, this _onNewSelection function seems to get called twice when it is opened (once for inspector-open and once for nodeselected. If you add some logging like this the top of the function: console.log(selection.reason); console.trace(); This patch fixes the issue, but breaks the inspector_basic_highlighter test. I was wondering if you could take a look at it and see if anything sticks out. The alternative to fix this issue is to remove the scrollIntoView: true on the _brieflyShowBoxModel call, because I can't tell when it is actually scrolling into except for this case, but I'm probably missing something here.
Attachment #8397966 -
Flags: feedback?(mratcliffe)
Reporter | ||
Comment 4•10 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #3) > Created attachment 8397966 [details] [diff] [review] > highlight-on-open-WIP.patch > > Mike, this _onNewSelection function seems to get called twice when it is > opened (once for inspector-open and once for nodeselected. If you add some > logging like this the top of the function: > > console.log(selection.reason); > console.trace(); > > This patch fixes the issue, but breaks the inspector_basic_highlighter test. > I was wondering if you could take a look at it and see if anything sticks > out. > > The alternative to fix this issue is to remove the scrollIntoView: true on > the _brieflyShowBoxModel call, because I can't tell when it is actually > scrolling into except for this case, but I'm probably missing something here. Failing test log: https://tbpl.mozilla.org/php/getParsedLog.php?id=36811991&tree=Try
Assignee | ||
Updated•10 years ago
|
Attachment #8397966 -
Flags: feedback?(mratcliffe) → feedback+
Assignee | ||
Comment 7•10 years ago
|
||
I don't understand why we would ever need scrollIntoView as it is likely to cause way more problems than it solves. I have removed the scrollIntoView option and everything appears to work fine. If we really need that option then it should be added to the markup view context menu. Try: https://tbpl.mozilla.org/?tree=Try&rev=0464270710ab
Attachment #8397966 -
Attachment is obsolete: true
Attachment #8404732 -
Flags: review?(bgrinstead)
Comment 8•10 years ago
|
||
(In reply to Michael Ratcliffe [:miker] [:mratcliffe] from comment #7) > Created attachment 8404732 [details] [diff] [review] > highlight-on-open-988102.patch > > I don't understand why we would ever need scrollIntoView as it is likely to > cause way more problems than it solves. > > I have removed the scrollIntoView option and everything appears to work > fine. If we really need that option then it should be added to the markup > view context menu. Agreed.
Reporter | ||
Updated•10 years ago
|
Attachment #8404732 -
Flags: review?(bgrinstead) → review+
Assignee | ||
Comment 9•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/5033a4da6a1e
Whiteboard: [fixed-in-fx-team]
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5033a4da6a1e
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 31
Reporter | ||
Comment 11•10 years ago
|
||
Comment on attachment 8404732 [details] [diff] [review] highlight-on-open-988102.patch [Approval Request Comment] Bug caused by (feature/regressing bug #): 663778 User impact if declined: The content page will scroll to the top after opening the inspector panel in devtools Testing completed (on m-c, etc.): Been on m-c since 4-14 Risk to taking this patch (and alternatives if risky): Low risk, just prevents scrolling to the selected element when it is selected in DevTools String or IDL/UUID changes made by this patch:
Attachment #8404732 -
Flags: approval-mozilla-aurora?
Updated•10 years ago
|
Attachment #8404732 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 12•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/73afe69f15d3
status-firefox30:
--- → fixed
status-firefox31:
--- → fixed
Updated•10 years ago
|
QA Whiteboard: [good first verify]
Comment 13•10 years ago
|
||
Hi, I was able to reproduce and verify it successfully on: - Windows 7 x86_64: reproduced on 31.0a1 BuildID 20140326030203 and verified the fix on latest Beta 30.0 ID:20140520115057 and Aurora 31.0a2 (2014-05-21) - Debian Linux x86_64: reproduced on 31.0a1 BuildID 20140326030203 and verified the fix on latest Beta (30.0 ID:20140520115057) and Aurora 31.0a2 (2014-05-21) As these are 2 platforms out of 3 I think it's safe to mark it as Verified. Cheers, Francesca
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•