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

No longer crash editor after removing link from image when LinkConfig#addTargetToExternalLinks is enabled #17281

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

Mati365
Copy link
Member

@Mati365 Mati365 commented Oct 17, 2024

Suggested merge commit message (convention)

Fix (link): No longer crash editor after removing link from image when LinkConfig#addTargetToExternalLinks: true is set. Closes #17252


Additional information

Decorator responsible for attaching some of the attributes enabled by addTargetToExternalLinks is executed after downcast dispatcher responsible for removing a elements inside <figure class="image ..." element. It caused the crash, because dispatcher getDispatcherForLinkedImage assumed that image is always present in decorated element. Dispatcher responsible for removing a tags is defined in downcastImageLink#221 in link/linkimageediting.ts file.

I did not change priority of dispatchers to avoid other regressions and changes in public API.

…g#addTargetToExternalLinks: true` is enabled
@Mati365 Mati365 changed the title No longer crash editor after removing link from image when LinkConfig#addTargetToExternalLinks: true is enabled No longer crash editor after removing link from image when LinkConfig#addTargetToExternalLinks is enabled Oct 17, 2024
@Mati365 Mati365 merged commit 45523b7 into master Oct 17, 2024
9 checks passed
@Mati365 Mati365 deleted the ck/17252 branch October 17, 2024 11:30
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.

Error on remove image link / ready event is fired more than once
2 participants