Repository navigation
Improve responsiveness of the floating text format toolbar buttons - #4298
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Thank you, mind expanding on the reasoning behind a px threshold vs checking whether mouse down + up happen within the same element? |
Nothing in particular, I'm sure both ways would work just fine. |
Could you hypothetically have different mousedown and mouseup targets though? Like an icon nested in a button? Haven't tested, just wondered if that would work as reliably. @zurfyx |
My hunch is that the target should be the most realiable approach, but we would check for the a common parent in this case. That said, I think that what @ChronicLynx is proposing is valid and it fixes an existing problem so I'll proceed to merge this. Thank you! |
Introduced a movement threshold so button clicks with slight motion to them aren't filtered out. The current behavior will ignore all clicks to the toolbar with even the slightest of mouse movement, causing the toolbar to feel unresponsive.
This was broken with the fix introduced in #3959. My fix should help to improve the feel of the buttons while still mitigating the toolbar flashes on drag to highlight.
Current Behavior:
Screen.Recording.2023-04-10.at.3.14.07.PM.mov
Fixed Behavior:
Screen.Recording.2023-04-10.at.3.13.07.PM.mov