Skip to content

simplify logic for the fix "Improve responsiveness of the floating text format toolbar buttons" - #4431

Merged
zurfyx merged 1 commit into
meta:mainfrom
AlessioGr:fix-floating-toolbar-button-clicks
May 1, 2023
Merged

zurfyx merged 1 commit into
meta:mainfrom
AlessioGr:fix-floating-toolbar-button-clicks

Conversation

@AlessioGr

@AlessioGr AlessioGr commented Apr 30, 2023 •

Copy link
Copy Markdown
Contributor

So, #4298 fixed the problem where button clicks in the floating toolbar did not react if the mouse was moving.

I actually came up with a different solution, where it simply checks if the mouse is over the floating toolbar element.

It's less code and does not require a mouseDownListener - thus I think it might improve readability + performance.

Do let me know what you think, or if the previous solution is better!

ALSO: I'm currently not home and only have my laptop trackpad to test - no mouse! Please test this out with a mouse to make sure this PR does not reduce the responsiveness compared to the previous solution!

@vercel

vercel Bot commented Apr 30, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2023 1:52pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2023 1:52pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 30, 2023

@zurfyx zurfyx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@zurfyx
zurfyx merged commit 60e9d42 into meta:main May 1, 2023
This was referenced May 23, 2023

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 5cb70589 Deployed Apr 30, 2023 by vercel[bot]
Preview – lexical — 5cb70589 Deployed Apr 30, 2023 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants