Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Revert "Merge pull request #841 from matrix-org/luke/fix-double-dialogs"
Browse files Browse the repository at this point in the history
This reverts commit 1913a32, reversing
changes made to 0c16298.
  • Loading branch information
dbkr committed May 16, 2017
1 parent 387529d commit 19dcd83
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/views/dialogs/BaseDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ export default React.createClass({
}
},

// Must be when the key is released (and not pressed) otherwise componentWillUnmount
// will focus another element which will receive future key events
_onKeyUp: function(e) {
_onKeyDown: function(e) {
if (e.keyCode === KeyCode.ESCAPE) {
e.stopPropagation();
e.preventDefault();
Expand All @@ -81,7 +79,7 @@ export default React.createClass({
const TintableSvg = sdk.getComponent("elements.TintableSvg");

return (
<div onKeyUp={this._onKeyUp} className={this.props.className}>
<div onKeyDown={this._onKeyDown} className={this.props.className}>
<AccessibleButton onClick={this._onCancelClick}
className="mx_Dialog_cancelButton"
>
Expand Down

0 comments on commit 19dcd83

Please sign in to comment.