Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(StatelessDialog.web): Fixes stealing Enter events

yanas47b6166d79f9
diff --git a/react/features/base/dialog/components/StatelessDialog.web.js b/react/features/base/dialog/components/StatelessDialog.web.js
index 50d3bba005..ae9bd3fd71 100644
--- a/react/features/base/dialog/components/StatelessDialog.web.js
+++ b/react/features/base/dialog/components/StatelessDialog.web.js
@@ -268,6 +268,12 @@ class StatelessDialog extends Component {
* @returns {void}
*/
_onKeyDown(event) {
+ // If the event coming to the dialog has been subject to preventDefault
+ // we don't handle it here.
+ if (event.defaultPrevented) {
+ return;
+ }
+
if (event.key === 'Enter') {
if (this.props.submitDisabled && !this.props.cancelDisabled) {
this._onCancel();