Selecting target within MBT not possible due to constant refreshes of dropdown list
Categories
(DevTools :: Inspector, defect)
Tracking
(firefox97 verified)
Tracking | Status | |
---|---|---|
firefox97 | --- | verified |
People
(Reporter: whimboo, Assigned: nchevobbe)
Details
Attachments
(1 file)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:97.0) Gecko/20100101 Firefox/97.0 ID:20211212214735
When using the MBT and trying to inspect a specific target you can open the dropdown at the right top corner to select a specific window proxy. When there is a long list of items present and you have to scroll down it's not possible to find and select an item before the list is getting refreshed. At this moment the scrollbar directly jumps back to the top, and you have to start looking for the wanted entry again.
Maybe we should not refresh the list while the drop down is open?
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
When a new target is added (or one is removed), the button and its associated panel are re-rendered via React.
The MenuButton
then calls tooltip.show
in order to update the size of the panel to match the re-rendered content (https://searchfox.org/mozilla-central/rev/b80b92e2e10299ab405bdc4eb5109e9e23e25160/devtools/client/shared/components/menu/MenuButton.js#225,230-233)
HTMLTooltip#show
does update the container bounds of its container (https://searchfox.org/mozilla-central/rev/b80b92e2e10299ab405bdc4eb5109e9e23e25160/devtools/client/shared/widgets/tooltip/HTMLTooltip.js#493), which does a few thing.
The interesting one is that it might sets the height
of the container to "auto" (https://searchfox.org/mozilla-central/rev/b80b92e2e10299ab405bdc4eb5109e9e23e25160/devtools/client/shared/widgets/tooltip/HTMLTooltip.js#567)
In the case you the list overflowed, it won't anymore
Then after some computation, we set another height (https://searchfox.org/mozilla-central/rev/b80b92e2e10299ab405bdc4eb5109e9e23e25160/devtools/client/shared/widgets/tooltip/HTMLTooltip.js#665), which will make it overflow again (if the content size is big enough).
But we never resets the scroll position to what it was, and so it will reset to 0, which gives the issue mentioned in Comment 0.
I'll push a quick WIP patch that does fix the issue (but would need tests + maybe handling of horizontal overflow ? )
Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Comment 4•3 years ago
|
||
bugherder |
Description
•