Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix table stealing selectionchange #4162

Merged
merged 2 commits into from
Mar 20, 2023
Merged

Fix table stealing selectionchange #4162

merged 2 commits into from
Mar 20, 2023

Conversation

zurfyx
Copy link
Member

@zurfyx zurfyx commented Mar 20, 2023

Turns out that the mouseDown logic inside the table plugin was handling more events than it should.

Screen.Recording.2023-03-20.at.3.19.08.PM.mov

Fixes #3785
Fixes #4138

@vercel
Copy link

vercel bot commented Mar 20, 2023

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

Name Status Preview Updated
lexical ✅ Ready (Inspect) Visit Preview Mar 20, 2023 at 7:46PM (UTC)
lexical-playground ✅ Ready (Inspect) Visit Preview Mar 20, 2023 at 7:46PM (UTC)

@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 Mar 20, 2023
Copy link
Contributor

@tylerjbainbridge tylerjbainbridge left a comment

Choose a reason for hiding this comment

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

good catch!

@github-actions
Copy link

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/lexical/dist/Lexical.js 26.85 KB (0%) 538 ms (0%) 435 ms (+144.02% 🔺) 972 ms
packages/lexical-rich-text/dist/LexicalRichText.js 37.69 KB (0%) 754 ms (0%) 540 ms (-14.14% 🔽) 1.3 s
packages/lexical-plain-text/dist/LexicalPlainText.js 37.66 KB (0%) 754 ms (0%) 428 ms (-16.62% 🔽) 1.2 s

@@ -141,21 +142,29 @@ export function applyTableHandlers(

Copy link
Contributor

Choose a reason for hiding this comment

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

  tableElement.addEventListener('mouseleave', () => {
    if (isMouseDown) {
      return;
    }
  });

Is this one needed at all? (unrelated to changes, just noticed)

Copy link
Member Author

Choose a reason for hiding this comment

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

Discussed offline; let's leave this for now as the comment above is important

  // Select entire table at this point, when grid selection is ready.

Basically means that it wasn't implemented yet 🙃

@zurfyx zurfyx merged commit c64532a into main Mar 20, 2023
@thegreatercurve thegreatercurve deleted the mouse-click-outside branch March 21, 2023 09:54
This was referenced Mar 21, 2023
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
5 participants