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

when input(not IME) after inline embed element, selection do not update #4065

Open
wpj-wpj-wpj opened this issue Mar 20, 2024 · 1 comment
Open

Comments

@wpj-wpj-wpj
Copy link

2024-03-20.11.33.13.mov

How to produce:

  • when inline embed element is at end of line, input after it
  • or set the cursor by click at the end of the inline embed element, then input. it don't work everytime,the trick is to click very close to the end of embed element. i guess the cause is click on the rightGuard of the embed element which is zero-width.

Debug:

when input after embed element, quill will excute twice setNativeRange:

optimize set the expected range from context

update set the wrong range

How to fix:

  • update should share the same context with optimize
  • when context.range exist which means optimize will handle the range, update should not setNativeRange
@wpj-wpj-wpj
Copy link
Author

I've oppened PR #4066

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants