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

Improve table selection handling when there are no siblings #3051

Merged
merged 2 commits into from
Sep 22, 2022

Conversation

tylerjbainbridge
Copy link
Contributor

Before

Screen.Recording.2022-09-22.at.1.03.52.PM.mov

After

Screen.Recording.2022-09-22.at.1.22.29.PM.mov

@vercel
Copy link

vercel bot commented Sep 22, 2022

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

Name Status Preview Updated
lexical ✅ Ready (Inspect) Visit Preview Sep 22, 2022 at 7:44PM (UTC)
lexical-playground ✅ Ready (Inspect) Visit Preview Sep 22, 2022 at 7:44PM (UTC)

@@ -916,6 +920,39 @@ export function applyTableHandlers(
$addHighlightStyleToTable(tableSelection);

return true;
} else if (selectionIsInsideTable) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This basically just checks if it's a range selection located inside of a table and if all of the cells are selected. If so, it converts the range selection to a grid selection.

@tylerjbainbridge tylerjbainbridge merged commit 3d6c737 into main Sep 22, 2022
@tylerjbainbridge tylerjbainbridge deleted the fix-table-selection-with-no-siblings branch September 22, 2022 21:44
@zurfyx zurfyx mentioned this pull request Sep 23, 2022
acywatson pushed a commit that referenced this pull request Oct 18, 2022
* Improve table selection handling when there are no siblings

* Refine solution
thegreatercurve pushed a commit that referenced this pull request Nov 25, 2022
* Improve table selection handling when there are no siblings

* Refine solution
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