Closed Bug 1415919 Opened 3 years ago Closed 3 years ago

JSON viewer should not scroll to the top of the row if it's too tall

Categories

(DevTools :: JSON Viewer, defect)

58 Branch
defect
Not set
normal

Tracking

(firefox-esr52 unaffected, firefox56 unaffected, firefox57 unaffected, firefox58 fixed)

RESOLVED FIXED
Firefox 58
Tracking Status
firefox-esr52 --- unaffected
firefox56 --- unaffected
firefox57 --- unaffected
firefox58 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

Details

(Keywords: regression)

Attachments

(1 file)

1. Open the console and enter

    location.href = encodeURI("data:application/json," + JSON.stringify(["Lorem ipsum. ".repeat(1500)]))

2. There should be a vertical scrollbar (otherwise shrink the Firefox window)

3. Scroll down

4. Select some text contents

Result: JSON Viewer scrolls to the top of the cell when you release the mouse. The text you selected may no longer be visible.
With this the behavior seems more reasonable, scrollIntoView should have some option to do this.
Comment on attachment 8926950 [details]
Bug 1415919 - Improve how JSON Viewer scrolls selected row into view.

https://reviewboard.mozilla.org/r/198202/#review203722

Looks reasonable, good work as usual Oriol!
R+ assuming Try is green

Honza
Attachment #8926950 - Flags: review?(odvarko) → review+
The Try failures were due to bug 1416070.
Keywords: checkin-needed
I did a trivial simplification of scrollContainer.
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/efbc0ed871b5
Improve how JSON Viewer scrolls selected row into view. r=Honza
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/efbc0ed871b5
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Depends on: 1416394
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.