Skip to content

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

Merged
etrepum merged 2 commits into
meta:mainfrom
ibastawisi:fix-touch-table-selection-scrolling
Mar 8, 2025
Merged

etrepum merged 2 commits into
meta:mainfrom
ibastawisi:fix-touch-table-selection-scrolling

Conversation

@ibastawisi

Copy link
Copy Markdown
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.

@vercel

vercel Bot commented Mar 8, 2025 •

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 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

@etrepum etrepum left a comment

Copy link
Copy Markdown
Collaborator

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;

@ibastawisi ibastawisi Mar 8, 2025 •

Copy link
Copy Markdown
Contributor Author

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.

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — afcb47da Deployed Mar 8, 2025 by vercel[bot]
Preview – lexical — afcb47da Deployed Mar 8, 2025 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. 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