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

fix: when compositionend after InlineEmbed element, selection do not update #4067

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wpj-wpj-wpj
Copy link

fix:#4046

after fix:

2024-03-20.17.49.55.mov

});

if (mutation) {
const range = this.restore(mutation.target as Text);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here is what this.restore does:

  • get text from mutation.target.data,
  • calculate range by text
  • reset mutation.target.data to empty

so only the first execution of this.restore is effective
the next execution will get empty text from mutation.target.data, and return wrong range, which is the cause of the issue #4046

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.

None yet

1 participant