mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Updated esc key handling on iframe
no issue - Updates the key event on owner document from the node
This commit is contained in:
parent
c90a947d94
commit
62d572613f
1 changed files with 3 additions and 3 deletions
|
@ -51,14 +51,14 @@ class PopupContent extends React.Component {
|
|||
this.context.onAction('closePopup');
|
||||
}
|
||||
};
|
||||
this.node.removeEventListener('keyup', this.keyUphandler);
|
||||
this.node.addEventListener('keyup', this.keyUphandler);
|
||||
this.node.ownerDocument.removeEventListener('keyup', this.keyUphandler);
|
||||
this.node.ownerDocument.addEventListener('keyup', this.keyUphandler);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
if (this.node) {
|
||||
this.node.removeEventListener('keyup', this.keyUphandler);
|
||||
this.node.ownerDocument.removeEventListener('keyup', this.keyUphandler);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue