element-web/src/components/views/dialogs
Luke Barnard 5f0ecc588f Fix dialog reappearing after hitting Enter
Fixes https://github.com/vector-im/riot-web/issues/3714

https://github.com/vector-im/riot-web/issues/3714#issuecomment-297460620 :
> It's as if there are two dialogs and as one closes, the other one appears. For some reason matrix-org/matrix-react-sdk#822 is causing this.
> I've realised it's because the `priorActiveElement` is probably the button that opened the dialog. If this is focused and the enter key is released, this triggers a keyPress which fires once the dialog has closed and the button has been focused 😬 the BaseDialog only calls stopPropagation _onKeyDown.

The soln. was to submit the dialog as finished `onKeyUp`. This means the `priorActiveElement` is focussed after any key events that should be associated with the dialog.
2017-04-26 17:37:52 +01:00
..
BaseDialog.js Fix dialog reappearing after hitting Enter 2017-04-26 17:37:52 +01:00
ChatCreateOrReuseDialog.js fix CSS for ChatCreateOrReuseDialog.js 2017-03-13 00:03:33 +00:00
ChatInviteDialog.js display err.message to user if available in error msgs 2017-04-23 01:48:27 +01:00
ConfirmRedactDialog.js clarify that redact === delete 2017-03-19 02:34:25 +00:00
ConfirmUserActionDialog.js fix kick dialog CSS 2017-03-13 00:47:33 +00:00
DeactivateAccountDialog.js Fix import for Lifecycle 2017-03-13 14:10:14 +00:00
ErrorDialog.js make autofocus explicit on errordialog as it autoFocus attr seems unreliable 2017-04-22 17:28:48 +01:00
InteractiveAuthDialog.js Remove old import & pass through result 2017-03-03 14:31:52 +00:00
NeedToRegisterDialog.js Create a common BaseDialog 2017-01-24 18:18:54 +00:00
QuestionDialog.js autofocus doesn't seem to work on this button 2017-04-20 00:42:13 +01:00
SessionRestoreErrorDialog.js Don't force-logout the user if reading localstorage fails 2017-02-15 19:33:39 +00:00
SetDisplayNameDialog.js Merge remote-tracking branch 'origin/develop' into rav/base_dialog 2017-01-25 15:01:11 +00:00
TextInputDialog.js Create a common BaseDialog 2017-01-24 18:18:54 +00:00
UnknownDeviceDialog.js show the room name in the UDE Dialog 2017-04-25 09:26:21 +01:00