Stop changing the horizontal scroll with Mouse Down on Inspector
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(firefox134 fixed)
| Tracking | Status | |
|---|---|---|
| firefox134 | --- | fixed |
People
(Reporter: andro.marian.v94, Assigned: nchevobbe)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0
Steps to reproduce:
Horizontal scroll to see an argument and clicking on it to copy
Actual results:
The horizontall scroll is jumping to start when the mouse button is pressed down
Expected results:
The scroll position should not be changed.
| Assignee | ||
Comment 1•1 year ago
|
||
Thanks for the report Marian.
I can reproduce, and I'm already seeing some version of this in Firefox 100, so this isn't recent.
This is caused as we're focusing the node https://searchfox.org/mozilla-release/rev/c284a53117c51009a607b527aca37bda477efd04/devtools/client/inspector/markup/views/markup-container.js#822-831
/**
* Try to put keyboard focus on the current editor.
*/
focus() {
// Elements with tabindex of -1 are not focusable.
const focusable = this.editor.elt.querySelector("[tabindex='0']");
if (focusable) {
focusable.focus();
}
},
| Assignee | ||
Comment 2•1 year ago
|
||
Setting the focus on the markup element was also triggering
the element to be scrolled into view, which causes a scroll
by default.
We don't need to scroll when the user clicked on the element,
as it's already visible, and worse, could cause horizontal scroll
to be reset, making it hard to edit an attribute.
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Updated•11 months ago
|
Description
•