The Node highlighter sometimes stays visible even if the node isn't hovered anymore
Categories
(DevTools :: Inspector, defect, P2)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(2 files)
STR: 1. Go the the console 2. Log some elements (e.g. `$$("body *")`) 3. Quickly move your cursor over a logged node ER: The highlighter isn't displayed AR: Sometimes, the highlighter stays on screen (See attached screencast) ---- In the console, we're using the highlighter `highlightDomValueGrip` functions (http://searchfox.org/mozilla-central/source/devtools/client/framework/toolbox-highlighter-utils.js#224-256), which does work asynchronously. The highlighter is called on mouseover, and the unhighlight on mouseout (see http://searchfox.org/mozilla-central/source/devtools/client/webconsole/new-console-output/components/grip-message-body.js#65-66). So it may occurs, if you pass your cursor over a node quickly, that the handler for the mouseout event is fired before the highlighter is shown, which led the highlighter to be displayed even if the node isn't highlighted anymore. This could be solved by the consumer of the highlighter's functions, but it would be better if we could handled that directly in the highlighter so we don't have to deal with this in all the consumers. Feel free to tell me I'm wrong and that it should/can only be handled by the consumer.
Updated•7 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Due to how highlighters work, it requires the inspector to be initialized.
It can happen than the user will mouseenter/mouseout on an element that
calls highlight/unhighlight very quickly.
Since the hightlight can take some time, it might happen that the unhighlight
call is handled first, before the highlight call, meaning that we now have an
highlighter displayed, even though the user isn't hovering anything that
should cause this anymore.
This patch introduces a new toolbox function called getHighlighter
that
returns an object with a highlight and a
unhighlightfunction. We keep a reference to any possible pending
highlightcall so we can wait for it to be done in
unhighlight`, before destroying it.
The console makes use of the new helper function, and a test is added to ensure
we don't have zombie highlighters anymore.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/781c16f05bfe Fix zombie highlighters. r=miker.
Comment 8•5 years ago
|
||
bugherder |
Description
•