diff --git a/lib/components/modal-overlay.react.js b/lib/components/modal-overlay.react.js
--- a/lib/components/modal-overlay.react.js
+++ b/lib/components/modal-overlay.react.js
@@ -7,10 +7,11 @@
type ModalOverlayProps = {
+onClose: () => void,
+children?: React.Node,
+ +disableTab?: boolean,
};
function ModalOverlay(props: ModalOverlayProps): React.Node {
- const { children, onClose } = props;
+ const { children, onClose, disableTab } = props;
const overlayRef = React.useRef();
const firstClickRef = React.useRef(null);
@@ -42,8 +43,11 @@
if (event.key === 'Escape') {
onClose();
}
+ if (disableTab && event.keyCode === 9) {
+ event.preventDefault();
+ }
},
- [onClose],
+ [disableTab, onClose],
);
return (
diff --git a/web/chat/edit-message-provider.js b/web/chat/edit-message-provider.js
--- a/web/chat/edit-message-provider.js
+++ b/web/chat/edit-message-provider.js
@@ -145,7 +145,9 @@
let modalOverlay;
if (modal) {
modalOverlay = (
- {modal}
+
+ {modal}
+
);
}