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

TINY-10755: fix some edge cases of selection.setContent #9554

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lorenzo-pomili
Copy link
Contributor

Related Ticket: TINY-10755

Description of Changes:
The problem was that after setContent the selection is moved to the next element if that element is a text node, but if this text node is wrapped by a pre+code or an h1 the selection was moved in the wrong place and it cause an error on insert new line.

I chose to change how the selection after setContent works because at the moment the insertion is impossible navigating the context to go back to the wrong selection

Pre-checks:

  • Changelog entry added
  • Tests have been added (if applicable)
  • Branch prefixed with feature/, hotfix/ or spike/

Review:

  • Milestone set
  • Docs ticket created (if applicable)

GitHub issues (if applicable):

@lorenzo-pomili lorenzo-pomili added this to the 7.1.0 milestone Apr 12, 2024
@lorenzo-pomili lorenzo-pomili requested a review from a team as a code owner April 12, 2024 07:05
@lorenzo-pomili lorenzo-pomili requested review from spocke, TheSpyder, hamza0867, a team, vpyshnenko and HAFRMO and removed request for a team April 12, 2024 07:05
@vpyshnenko
Copy link
Contributor

Do we still need this fix after this comment?

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

3 participants