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

KeystrokeHandler should support priorities and proper canceling #4970

Closed
oleq opened this issue Aug 21, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-utils#181
Closed

KeystrokeHandler should support priorities and proper canceling #4970

oleq opened this issue Aug 21, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-utils#181
Assignees
Labels
package:utils type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@oleq
Copy link
Member

oleq commented Aug 21, 2017

KeystrokeHandler callbacks must have priorities just like Emitter events. I will allow us to make sure that no matter the order plugins are loaded, PluginX's callback will always prevail over the PluginY's if their priority is high.

Alo, ATM, if a listener in the KH cancels like

hk.set( 'Tab', ( data, cancel ) => {
	cancel();
} );

it only causes preventDefault and stopPropagation in DOM. It does not prevent other Tab callbacks from executing and that needs to be fixed if the PluginX callback is to be executed but the one belonging to the PluginY ignored.

Related issue https://github.com/ckeditor/ckeditor5-link/issues/87.
A follow-up of #447 (comment).

@oleq oleq self-assigned this Aug 21, 2017
Reinmar referenced this issue in ckeditor/ckeditor5-utils Aug 21, 2017
Feature: `KeystrokeHandler` should support priorities and proper keystroke cancelling. Closes #180.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-utils Oct 9, 2019
@mlewand mlewand added this to the iteration 11 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:utils labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:utils type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
2 participants