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

[lexical-table] Bug Fix: Fix unintended touch table cell selection when scrolling #7309

Merged

Conversation

ibastawisi
Copy link
Contributor

This pull request adds a new property to track the type of pointer used and delegates the creation of a table selection until selection change occurs.

This approach would fix #7308.

Copy link

vercel bot commented Mar 8, 2025

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 Mar 8, 2025 2:04am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 8, 2025 2:04am

@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 8, 2025
Copy link
Collaborator

@etrepum etrepum left a comment

Choose a reason for hiding this comment

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

LGTM!

),
true,
);
tableObserver.pointerType = null;
Copy link
Contributor Author

@ibastawisi ibastawisi Mar 8, 2025

Choose a reason for hiding this comment

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

Maybe we should reset the flag regardless of anchor and focus being different, this would only trigger table selection on consecutive tabs on different cells without selection changes between them..

The downside is inconsistent behavior and maybe the flag state gets lost if multiple discrete selection changes happen following a single tab.

@etrepum etrepum added this pull request to the merge queue Mar 8, 2025
Merged via the queue into facebook:main with commit 993184c Mar 8, 2025
45 checks passed
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. extended-tests Run extended e2e tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Selecting table cells on touch devices happens unintentionally when scrolling
3 participants