1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-07 02:53:00 +00:00

Add "code" and "key" to propogateKeydownEvent's cloneEvent (#7071)

* feat: add key

* feat: add code
This commit is contained in:
lin onetwo
2022-11-30 18:17:10 +08:00
committed by GitHub
parent 319d7fbe9c
commit f7ccba4c25

View File

@@ -298,7 +298,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
Propogate keydown events to our container for the keyboard widgets benefit Propogate keydown events to our container for the keyboard widgets benefit
*/ */
EditTextWidget.prototype.propogateKeydownEvent = function(event) { 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); return !this.parentDomNode.dispatchEvent(newEvent);
}; };