Closed Bug 1469959 Opened 6 years ago Closed 6 years ago

Clicking on scrolled out expanded object updates the scroll

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox61 unaffected, firefox62 verified, firefox63 verified)

VERIFIED FIXED
Firefox 63
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox61 --- unaffected
firefox62 --- verified
firefox63 --- verified

People

(Reporter: jdescottes, Assigned: nchevobbe)

References

Details

(Keywords: regression)

Attachments

(2 files)

STRs: - open console - log an object with many properties, eg `document` - expand the object - scrolldown until you see `prototype` - expand prototype ER: prototype is expanded AR: viewport scrolls to show the beginning of the object, prototype is not expanded
see attachment for STRs
I see the tree component already tries to avoid scrolling when user clicks on the tree. However before triggering the click event, a focus event is first received, which triggers the scroll. The tree seems to lose the focus every time we expand it, fixing this is probably another way to approach this issue.
That looks bad. I'll do a mozregression when I get a better connection to see how long it's been here.
DevEdition doesn't appear to be impacted.
Assignee: nobody → nchevobbe
Priority: -- → P1
Comment on attachment 8987748 [details] Bug 1469959 - Don't use relatedTarget to check if the ObjectInspector was focused by tabbing; . https://reviewboard.mozilla.org/r/253024/#review259616 ::: devtools/client/webconsole/test/mochitest/browser_webconsole_object_inspector_scroll.js:10 (Diff revision 3) > + > +// Check that expanding an objectInspector node doesn't alter the output scroll position. > +const TEST_URI = "data:text/html;charset=utf8,test Object Inspector"; > + > +add_task(async function() { > + const toolbox = await openNewTabAndToolbox(TEST_URI, "webconsole"); Note: we should probably have a getter for toolbox on `hud`, so we could still use openNewTabAndConsole to get hud directly then fetch toolbox from there. This is done in a number of tests (https://searchfox.org/mozilla-central/search?q=toolbox.getCurrentPanel().hud&path=) so maybe we should spin off a separate bug to simplify this access.
Attachment #8987748 - Flags: review?(bgrinstead) → review+
Comment on attachment 8987748 [details] Bug 1469959 - Don't use relatedTarget to check if the ObjectInspector was focused by tabbing; . https://reviewboard.mozilla.org/r/253024/#review259616 > Note: we should probably have a getter for toolbox on `hud`, so we could still use openNewTabAndConsole to get hud directly then fetch toolbox from there. > > This is done in a number of tests (https://searchfox.org/mozilla-central/search?q=toolbox.getCurrentPanel().hud&path=) so maybe we should spin off a separate bug to simplify this access. Sounds good, I filed Bug 1471245 for this.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eb6d71b705a8 Don't use relatedTarget to check if the ObjectInspector was focused by tabbing; r=bgrins.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Comment on attachment 8987748 [details] Bug 1469959 - Don't use relatedTarget to check if the ObjectInspector was focused by tabbing; . Approval Request Comment [Feature/Bug causing the regression]: Bug 1463415 [User impact if declined]: Can't expand an object in the webconsole + weird scroll behavior [Is this code covered by automated tests?]: Yes [Has the fix been verified in Nightly?]: Yes [Needs manual test from QE? If yes, steps to reproduce]: Yes - Open the webconsole at the bottom of the screen - Evaluate `inspect(Math)` - Make sure there's a vertical scrollbar on the console - Scroll to the bottom and click on the "<prototype>" node - Make sure the node is correctly expanded and that the scroll position stays the same. [List of other uplifts needed for the feature/fix]: - [Is the change risky?]: No [Why is the change risky/not risky?]: Because it rolls back the small piece of code that introduced this issue and a test was added to make sure this works as expected. [String changes made/needed]: -
Attachment #8987748 - Flags: approval-mozilla-beta?
Comment on attachment 8987748 [details] Bug 1469959 - Don't use relatedTarget to check if the ObjectInspector was focused by tabbing; . Fix for a new regression, let's take this for beta 4. Thanks for the new test!
Attachment #8987748 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
I've reproduced the issue on Firefox Nightly 62.0a1 (2018-06-19) under Windows 10 (x64), using STR from Comment 0. The issue is no longer reproducible on Firefox Beta 62.0b4 and Firefox Nightly 63.0a1 (2018-06-29). The tests were performed under Windows 10 (x64), Ubuntu 16.04 (x64) and macOS 10.12.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
This issue is back in recent nightlies, with the new JSTerm. Should we reopen or file a new bug?
Flags: needinfo?(nchevobbe)
We should file a new one since the regression happened recently (I think I know where)
Flags: needinfo?(nchevobbe)
Blocks: 1486364
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: