Browse Source

Prevented default browser actions after CTRL+K.

Maciej Bukowski 8 years ago
parent
commit
514c5d80a8
1 changed files with 5 additions and 1 deletions
  1. 5 1
      packages/ckeditor5-link/src/link.js

+ 5 - 1
packages/ckeditor5-link/src/link.js

@@ -132,7 +132,11 @@ export default class Link extends Plugin {
 		const t = editor.t;
 
 		// Handle the `Ctrl+K` keystroke and show the panel.
-		editor.keystrokes.set( linkKeystroke, () => {
+		editor.keystrokes.set( linkKeystroke, ( keyEvtData, stop ) => {
+			// Stop the event in the DOM to prevent default browser action.
+			// See https://github.com/ckeditor/ckeditor5-link/issues/153.
+			stop();
+
 			if ( linkCommand.isEnabled ) {
 				this._showPanel( true );
 			}