Check if setTimeout call is needed in HTMLTooltip#show
Categories
(DevTools :: Shared Components, task, P3)
Tracking
(Not tracked)
People
(Reporter: nchevobbe, Unassigned)
References
Details
In the HTMLTooltip#show
function, we're waiting for a tick (by calling setTimeout
with an interval of 0
) before setting some click handlers on the window and emitting the shown
event.
From quick testing on my local OSX machine, doing the same thing directly, not in a setTimeout
callback, does not seem to change anything.
We should check if there's an impact on other OSes. If not, the code can be changed; if there's an impact, we should add a comment explaining why this is needed.
Reporter | ||
Comment 1•5 years ago
•
|
||
it is needed : https://treeherder.mozilla.org/#/jobs?repo=try&revision=78a5988726fa97768d5991eaf04bf5f19512fd45
Our guess about the event listeners callback being called right away if the tooltip is shown from a click was right for Windows and Linux.
I'll add a comment before the setTimeout in the patch I'm currently working on.
Description
•