From 26855ccfa4f00935e749613836d915bdd25c7198 Mon Sep 17 00:00:00 2001 From: fredck Date: Tue, 26 May 2020 17:24:17 +0200 Subject: [PATCH] Removed the confirmation of mention selection by using the space key. --- packages/ckeditor5-mention/src/mentionui.js | 3 +-- packages/ckeditor5-mention/tests/mentionui.js | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/ckeditor5-mention/src/mentionui.js b/packages/ckeditor5-mention/src/mentionui.js index 54b61d67cb1..539b3880344 100644 --- a/packages/ckeditor5-mention/src/mentionui.js +++ b/packages/ckeditor5-mention/src/mentionui.js @@ -34,7 +34,6 @@ const handledKeyCodes = [ keyCodes.arrowdown, keyCodes.enter, keyCodes.tab, - keyCodes.space, keyCodes.esc ]; @@ -121,7 +120,7 @@ export default class MentionUI extends Plugin { this._mentionsView.selectPrevious(); } - if ( data.keyCode == keyCodes.enter || data.keyCode == keyCodes.tab || data.keyCode == keyCodes.space ) { + if ( data.keyCode == keyCodes.enter || data.keyCode == keyCodes.tab ) { this._mentionsView.executeSelected(); } diff --git a/packages/ckeditor5-mention/tests/mentionui.js b/packages/ckeditor5-mention/tests/mentionui.js index 578319f0019..3b7a133ebe9 100644 --- a/packages/ckeditor5-mention/tests/mentionui.js +++ b/packages/ckeditor5-mention/tests/mentionui.js @@ -1572,8 +1572,6 @@ describe( 'MentionUI', () => { testExecuteKey( 'enter', keyCodes.enter, feedItems ); testExecuteKey( 'tab', keyCodes.tab, feedItems ); - - testExecuteKey( 'space', keyCodes.space, feedItems ); } ); } ); @@ -1724,8 +1722,6 @@ describe( 'MentionUI', () => { testExecuteKey( 'enter', keyCodes.enter, issues ); testExecuteKey( 'tab', keyCodes.tab, issues ); - - testExecuteKey( 'space', keyCodes.space, issues ); } ); } ); } ); @@ -1849,8 +1845,6 @@ describe( 'MentionUI', () => { testExecuteKey( 'enter', keyCodes.enter, issues ); testExecuteKey( 'tab', keyCodes.tab, issues ); - - testExecuteKey( 'space', keyCodes.space, issues ); } ); describe( 'mouse', () => {