Closed zswaff closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
lexical-vue | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 5, 2023 1:11am |
lexical-vue-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 5, 2023 1:11am |
Thank you!
Background
As it stands now, making multiple instances of
<LexicalCheckListPlugin>
(e.g. with two editors on one page) will instantiate separate instances oflet listenersCount = 0
and therefore both (or all) of the editors will separately register document-level event listeners forclick
andpointerDown
.Repro
Make an even number of editors in one page, each with the checklist plugin. An even number of listeners are registered on the document. When a checkbox is clicked an even number of
handeClick
s are fired and the checkbox is toggled an even number of times. From a user's perspective the box does not change on click.Notes
Does the fix make sense and work? This was the best fix I found but happy to implement a different way if preferable.