Revert "Allow global keyboard shortcuts to work in framed editor (#6705)"

This reverts commit 8e64e21039.

See https://github.com/Jermolene/TiddlyWiki5/pull/6705#issuecomment-1162738927
This commit is contained in:
jeremy@jermolene.com 2022-06-22 08:18:13 +01:00
parent 0391e1855c
commit 5e35c8dda6
2 changed files with 1 additions and 5 deletions

View File

@ -84,9 +84,6 @@ function FramedEngine(options) {
// Copy the styles from the dummy textarea
this.copyStyles();
// Add event listeners
$tw.utils.addEventListeners(this.iframeDoc, [
{name: "keydown",handlerObject: $tw.keyboardManager,handlerMethod: "handleKeydownEvent", capture: true},
]);
$tw.utils.addEventListeners(this.domNode,[
{name: "click",handlerObject: this,handlerMethod: "handleClickEvent"},
{name: "input",handlerObject: this,handlerMethod: "handleInputEvent"},

View File

@ -198,7 +198,6 @@ Each entry in the events array is an object with these properties:
handlerFunction: optional event handler function
handlerObject: optional event handler object
handlerMethod: optionally specifies object handler method name (defaults to `handleEvent`)
capture: optionally specifies the listener should use capture (defaults to `false`)
*/
exports.addEventListeners = function(domNode,events) {
$tw.utils.each(events,function(eventInfo) {
@ -214,7 +213,7 @@ exports.addEventListeners = function(domNode,events) {
handler = eventInfo.handlerObject;
}
}
domNode.addEventListener(eventInfo.name,handler,!!eventInfo.capture);
domNode.addEventListener(eventInfo.name,handler,false);
});
};