Skip to content

Commit

Permalink
Revert "Allow global keyboard shortcuts to work in framed editor (#6705
Browse files Browse the repository at this point in the history
…)"

This reverts commit 8e64e21.

See #6705 (comment)
  • Loading branch information
Jermolene committed Jun 22, 2022
1 parent 0391e18 commit 5e35c8d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions core/modules/editor/engines/framed.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
3 changes: 1 addition & 2 deletions core/modules/utils/dom/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
});
};

Expand Down

0 comments on commit 5e35c8d

Please sign in to comment.