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-react] Bug Fix: checklist cannot be toggled in sub-editors #6216

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

AlessioGr
Copy link
Contributor

@AlessioGr AlessioGr commented May 30, 2024

Description

Checklists within sub-editors do not work. When toggling them, both the click event listeners for the sub-editor, as well as the one for the parent-editor, are triggered. Say the checklist item is untoggled, this would cause the checklist item to be toggled-on and then immediately toggled-off. Visually, it will look like nothing happened at all, as seen in the video.

Adding event.stopPropagation() stops the event from being incorrectly propagated up to the parent

Before

CleanShot.2024-05-30.at.17.06.16.mp4

After

CleanShot.2024-05-30.at.17.05.04.mp4

Copy link

vercel bot commented May 30, 2024

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 Jun 3, 2024 11:12am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2024 11:12am

@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 May 30, 2024
Copy link

github-actions bot commented May 30, 2024

size-limit report 📦

Path Size
lexical - cjs 28.33 KB (0%)
lexical - esm 28.14 KB (0%)
@lexical/rich-text - cjs 36.76 KB (0%)
@lexical/rich-text - esm 28.1 KB (0%)
@lexical/plain-text - cjs 35.37 KB (0%)
@lexical/plain-text - esm 25.33 KB (0%)
@lexical/react - cjs 38.52 KB (0%)
@lexical/react - esm 29.12 KB (0%)

Copy link
Contributor

@potatowagon potatowagon left a comment

Choose a reason for hiding this comment

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

👍 thanks!

@Sahejkm Sahejkm added extended-tests Run extended e2e tests on a PR and removed extended-tests Run extended e2e tests on a PR labels May 31, 2024
@Sahejkm
Copy link
Contributor

Sahejkm commented Jun 3, 2024

hi @AlessioGr, sorry for the inconvenience caused in the CI do you mind merging latest Main to this branch before we try remerging this PR to main, to make sure all e2e tests are green. Thanks a lot!

@Sahejkm Sahejkm added the extended-tests Run extended e2e tests on a PR label Jun 3, 2024
@Sahejkm Sahejkm added this pull request to the merge queue Jun 3, 2024
Merged via the queue into facebook:main with commit 35efa43 Jun 3, 2024
38 checks passed
zurfyx added a commit that referenced this pull request Jun 6, 2024
@zurfyx
Copy link
Member

zurfyx commented Jun 6, 2024

@AlessioGr We have to revert this as it's breaking internally but feel free to post a follow up PR. While event.stopPropagation() might be correct for this case, it is currently being triggered for every single click on the editor, the scope needs to be revised.

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.

5 participants