From 19dcd83aeb834c1f67a852033c1ef76a6b2e60b5 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 16 May 2017 14:50:19 +0100 Subject: [PATCH] Revert "Merge pull request #841 from matrix-org/luke/fix-double-dialogs" This reverts commit 1913a32fbd0c303080645f2661cacff25ccff232, reversing changes made to 0c16298c452089188bcc156cf213358988ce7341. --- src/components/views/dialogs/BaseDialog.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/views/dialogs/BaseDialog.js b/src/components/views/dialogs/BaseDialog.js index 279dedbd43..d0f34c5fbd 100644 --- a/src/components/views/dialogs/BaseDialog.js +++ b/src/components/views/dialogs/BaseDialog.js @@ -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(); @@ -81,7 +79,7 @@ export default React.createClass({ const TintableSvg = sdk.getComponent("elements.TintableSvg"); return ( -
+