dillon1000/react

Commit

Scheduling profiler: Fix tooltip wheel event regression (#22130)

Panning horizontally via mouse wheel used to allow you to scrub over snapshot images. This was accidentally broken by a recent change. The core of the fix for this was to update `useSmartTooltip()` to remove the dependencies array so that a newly rendered tooltip is positioned even if the mouseX/mouseY coordinates don't change (as they don't when panning via wheel).

I also cleaned a couple of unrelated things up while doing this:
* Consolidated hover reset logic formerly split between `CanvasPage` and `Surface` into the `Surface` `handleInteraction()` function.
* Cleaned up redundant ref setting code in EventTooltip.
Browse files
Changed paths4 files
First-parent comparison
M packages/react-devtools-scheduling-profiler/src/CanvasPage.js ModifiedM packages/react-devtools-scheduling-profiler/src/EventTooltip.js ModifiedM packages/react-devtools-scheduling-profiler/src/utils/useSmartTooltip.js ModifiedM packages/react-devtools-scheduling-profiler/src/view-base/Surface.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…