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

Keep cursor unlinked to avoid elements being pushed down inside #3534

Merged
merged 1 commit into from
Feb 18, 2022

Conversation

luin
Copy link
Member

@luin luin commented Feb 16, 2022

When .ql-cursor is inside a link, and the user types a character, Safari will push down the link inside .ql-cursor and move the cursor's textNode inside the link. This breaks our position calculation. So this PR makes sure the cursor is always unlinked to avoid this.

To test:

  1. Type "abc", bold them and linkify them.
  2. Move the caret after "c", press cmd+b to cancel the bold format.
  3. Type any characters, and delete some characters, make sure everything works as expected.

@jhchen jhchen merged commit d462f80 into develop Feb 18, 2022
@jhchen jhchen deleted the zh-cursor-link branch February 18, 2022 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants