From f7ccba4c255cefd1cdfeb15a7b2506fc8cb04b58 Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Wed, 30 Nov 2022 18:17:10 +0800 Subject: [PATCH] Add "code" and "key" to propogateKeydownEvent's cloneEvent (#7071) * feat: add key * feat: add code --- core/modules/editor/factory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/editor/factory.js b/core/modules/editor/factory.js index 118f44f43..90ab66ae9 100644 --- a/core/modules/editor/factory.js +++ b/core/modules/editor/factory.js @@ -298,7 +298,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) { Propogate keydown events to our container for the keyboard widgets benefit */ EditTextWidget.prototype.propogateKeydownEvent = function(event) { - var newEvent = this.cloneEvent(event,["keyCode","which","metaKey","ctrlKey","altKey","shiftKey"]); + var newEvent = this.cloneEvent(event,["keyCode","code","which","key","metaKey","ctrlKey","altKey","shiftKey"]); return !this.parentDomNode.dispatchEvent(newEvent); };