Closed Bug 1873147 Opened 7 months ago Closed 7 months ago

Preview popup position and highlighted token are not updated when hover quickly to another token

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox123 fixed)

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Sometimes, the hovered token is not the one being highlighted (when moving the mouse quickly from a token to another), and the popup doesn't point to the right token

This seems to be caused because:

  1. Popup only sets things on mount/unmount, but when moving quickly, the popup is updated, so we should do something in componentDidUpdate
  2. Popover only updates his coordinates when the popover type changes, we should rather check if the target changed

In Popup, we were only adding/removing the highlight on hovered token on mount/unmount.
But it can happen that the component gets updated (e.g. when the user moves quickly
between valid tokens).
In such case, we want to remove the highlighted class on all elements that it was
set on, and only add it back on the "preview target".
We also want to update the Popover position so it points to the actual token the
preview was computed for.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5433f5de59c8
[devtools] Update token highlight and popup position when Popup updates. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: