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

Blur event not fired when command / control key pressed #387

Open
Dharmin2108 opened this issue Nov 28, 2023 · 1 comment
Open

Blur event not fired when command / control key pressed #387

Dharmin2108 opened this issue Nov 28, 2023 · 1 comment

Comments

@Dharmin2108
Copy link

Dharmin2108 commented Nov 28, 2023

When component is in edit mode and when Command key (on Mac) or Control key (on windows) is pressed, after that if clicked outside editor area it will blur the editor but not firing the blur event.

@Dharmin2108 Dharmin2108 changed the title Blur event not fired when meta key (command or control) pressed Blur event not fired when meta key (command or windows) pressed Nov 28, 2023
@Dharmin2108 Dharmin2108 changed the title Blur event not fired when meta key (command or windows) pressed Blur event not fired when command / control key pressed Nov 28, 2023
@Dharmin2108
Copy link
Author

I have figured out workaround for this issue.

I have added keyup event in events object inside config object like this

'keyup': function (e) {
              if ([17, 91, 93].includes(e.keyCode)) {
                ref.current.editor.events.enableBlur();
              }
            },

This just enables blur event again and it will trigger blur event when edit is blurred.

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

No branches or pull requests

1 participant