8
0
Pārlūkot izejas kodu

Prevented default browser actions after CTRL+K.

Maciej Bukowski 8 gadi atpakaļ
vecāks
revīzija
514c5d80a8
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  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 );
 			}