not enough focusing range of developer tool's search
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(firefox58 wontfix, firefox59 wontfix, firefox60 wontfix, firefox142 fixed)
People
(Reporter: cs09gi, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Comment 1•8 years ago
|
||
Updated•8 years ago
|
Updated•8 years ago
|
Updated•7 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
We're using our scrollIntoViewIfNeeded helper https://searchfox.org/mozilla-release/rev/55854d1d5fea58eb257bedfe707f2228556943a3/devtools/client/inspector/markup/markup.js#1700,1716
showNode(node, { centered = true, slotted, smoothScroll = false } = {}) {
...
scrollIntoViewIfNeeded(container.editor.elt, centered, smoothScroll);
which uses window.scrollBy
We could probably try to use Element#scrollIntoViewIfNeeded instead, which seems to handle the case from comment 0 just fine
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 3•11 months ago
|
||
When navigating through search results, we were selecting nodes and scrolling
them into view, centered vertically.
This is not working well in some cases:
- if the node itself is taller than the markup view, we're scrolling in the middle
of the node and might miss the actual search results - if the node is wider than the markup view, since we're not scrolling horizontally,
we might miss a search result at the very right of the node
To fix those issue, we're taking advantage of nsISelectionController.scrollSelectionIntoView,
putting the first search result Range in the selection so we scroll to the right location.
It's okay to put the Range in the selection since the user can't have any text
selected at this point.
A couple test cases are added to cover this.
Updated•11 months ago
|
Comment 6•11 months ago
|
||
| bugherder | ||
Updated•10 months ago
|
Updated•9 months ago
|
Description
•