From 389daab664d98a91f6782319bd84464313fd02e0 Mon Sep 17 00:00:00 2001 From: Neil Jenkins Date: Mon, 26 Mar 2018 10:06:01 +0100 Subject: [PATCH] If ctrl/meta held down, key is not inserting text --- source/KeyHandlers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/KeyHandlers.js b/source/KeyHandlers.js index 31905ad..c57fc46 100644 --- a/source/KeyHandlers.js +++ b/source/KeyHandlers.js @@ -59,7 +59,8 @@ var onKey = function ( event ) { if ( this._keyHandlers[ key ] ) { this._keyHandlers[ key ]( this, event, range ); - } else if ( !range.collapsed && ( event.key || key ).length === 1 ) { + } else if ( !range.collapsed && !event.ctrlKey && !event.metaKey && + ( event.key || key ).length === 1 ) { // Record undo checkpoint. this.saveUndoState( range ); // Delete the selection