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
fix get text selectRect error #4263
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thank you! Can you please expand on your test plan and how you repro'ed the issue? I don't think I've come across this issue before when typing on Lexical |
Here's a recurring example https://codesandbox.io/p/sandbox/relaxed-river-h6oe24 I'm not sure it has anything to do with this setting Here's the replay video video.mp4 |
fix Text scrollIntoView Co-authored-by: Gerard Rovira <zurfyx@users.noreply.github.com>
fix range.select to range.selectNode
The closest we have (built-in) are token nodes but I don't think they're great for your use case either. In any case, it shouldn't crash. The code I provided is pseudocode, you will have to adjust it a bit |
Yes, I've adjusted |
Thank you, LGTM! |
getBoundingClientRect
is not a function whenselectionTarget
is of typeText
, So just by judgingselectionTarget! == null
will not avoid this error