[RFC] Lexical update retain selection when no event
You unfocus the editor, editor._editorState._selection retains selection, you trigger
editor.dispatchCommand
Selection is lost.
Doesn't feel right. This PR addresses this.
Putting as RFC for now as there's no tests and want to double check this wasn't intended to cover some other case.
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 9, 2024 11:17pm |
| lexical-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 9, 2024 11:17pm |
size-limit report 📦
| Path | Size |
|---|---|
| lexical - cjs | 28.31 KB (0%) |
| lexical - esm | 28.13 KB (0%) |
| @lexical/rich-text - cjs | 36.77 KB (0%) |
| @lexical/rich-text - esm | 28.09 KB (0%) |
| @lexical/plain-text - cjs | 35.36 KB (0%) |
| @lexical/plain-text - esm | 25.33 KB (0%) |
| @lexical/react - cjs | 38.51 KB (0%) |
| @lexical/react - esm | 29.14 KB (0%) |
Note the failing UTs
🚢🚢🚢
🚢🚢🚢

merged main into the branch, curious if this is still a legit fix, seems like one? @zurfyx
Closing this PR due to staleness! If there are new updates, please reopen the PR.