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

BUGFIX: Update formattingUnderCursor when CKEditor focus changes #3325

Conversation

grebaldi
Copy link
Contributor

@grebaldi grebaldi commented Jan 5, 2023

refs: #3224

The Problem

Peek.2023-01-05.14-00.-.3224.webm

While investigating #3224, I noticed that the EditorToolbar sometimes receives the wrong formattingUnderCursor when another node is being selected. In fact, in those cases, the EditorToolbar received the formattingUnderCursor corresponding to the previous selection.

By debugging the events triggered by CKEditor I was able to find out that in those cases a change:isFocused event got triggered, but no change event, which would have updated the formattingUnderCursor.

The Solution

This PR makes sure that formattingUnderCursor is properly updated when change:isFocused occurs through CKEditor. It does so by calling the handleUserInteractionCallback that is also called when the change event occurs.

Though I was unable to reproduce the original problem described in #3224, it would be very well explicable, if that problem was solved by this measure as well. It would be helpful, if someone who is able to reproduce the issue could verify this :)

Copy link
Member

@Sebobo Sebobo left a comment

Choose a reason for hiding this comment

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

Thx!

I was able to (randomly) reproduce the issue and couldn't anymore with this fix.

@mhsdesign
Copy link
Member

thx will look into it ;)

Copy link
Member

@crydotsnake crydotsnake left a comment

Choose a reason for hiding this comment

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

Tested it and works as expected!

@crydotsnake crydotsnake merged commit cd13b78 into neos:7.3 Jan 14, 2023
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.

4 participants