Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3352090
D7838.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7838.diff
View Options
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
@@ -8,19 +8,20 @@
+onClose: () => void,
+children?: React.Node,
+disableTab?: boolean,
+ +disableAutoFocus?: boolean,
};
function ModalOverlay(props: ModalOverlayProps): React.Node {
- const { children, onClose, disableTab } = props;
+ const { children, onClose, disableTab, disableAutoFocus } = props;
const overlayRef = React.useRef();
const firstClickRef = React.useRef(null);
React.useLayoutEffect(() => {
- if (overlayRef.current) {
+ if (!disableAutoFocus && overlayRef.current) {
overlayRef.current.focus();
}
- }, []);
+ }, [disableAutoFocus]);
const onBackgroundMouseDown = React.useCallback(event => {
firstClickRef.current = event.target;
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
@@ -147,7 +147,11 @@
return null;
}
return (
- <ModalOverlay onClose={clearEditModal} disableTab={true}>
+ <ModalOverlay
+ onClose={clearEditModal}
+ disableTab={true}
+ disableAutoFocus={true}
+ >
{modal}
</ModalOverlay>
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 4:35 AM (20 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2573946
Default Alt Text
D7838.diff (1 KB)
Attached To
Mode
D7838: [web] Disabled auto focus on overlay when entering edit mode
Attached
Detach File
Event Timeline
Log In to Comment