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(BaseDialog):Update onSubmit for keyDown.

Hristo Terezov22eff7fa217a
diff --git a/react/features/base/ui/components/web/BaseDialog.tsx b/react/features/base/ui/components/web/BaseDialog.tsx
index 33170e8d76..f88db90abd 100644
--- a/react/features/base/ui/components/web/BaseDialog.tsx
+++ b/react/features/base/ui/components/web/BaseDialog.tsx
@@ -170,13 +170,13 @@ const BaseDialog = ({
if (e.key === 'Enter' && !disableEnter) {
submit?.();
}
- }, []);
+ }, [ disableEnter, onClose, submit ]);
useEffect(() => {
window.addEventListener('keydown', handleKeyDown);
return () => window.removeEventListener('keydown', handleKeyDown);
- }, []);
+ }, [ handleKeyDown ]);
return (
<div className = { cx(classes.container, isUnmounting && 'unmount') }>