mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 05:38:12 +00:00
Focus-trap: Use allowOutsideClick where appropriate
This commit is contained in:
@@ -58,7 +58,12 @@ export const ModalHost = React.memo(
|
||||
|
||||
return root
|
||||
? createPortal(
|
||||
<FocusTrap>
|
||||
<FocusTrap
|
||||
focusTrapOptions={{
|
||||
// This is alright because the overlay covers the entire screen
|
||||
allowOutsideClick: false,
|
||||
}}
|
||||
>
|
||||
<div
|
||||
role="presentation"
|
||||
className={classNames(
|
||||
|
||||
@@ -303,7 +303,11 @@ export const EmojiPicker = React.memo(
|
||||
);
|
||||
|
||||
return (
|
||||
<FocusTrap>
|
||||
<FocusTrap
|
||||
focusTrapOptions={{
|
||||
allowOutsideClick: true,
|
||||
}}
|
||||
>
|
||||
<div className="module-emoji-picker" ref={ref} style={style}>
|
||||
<header className="module-emoji-picker__header">
|
||||
<button
|
||||
|
||||
@@ -148,7 +148,11 @@ export const StickerPicker = React.memo(
|
||||
const showLongText = showPickerHint;
|
||||
|
||||
return (
|
||||
<FocusTrap>
|
||||
<FocusTrap
|
||||
focusTrapOptions={{
|
||||
allowOutsideClick: true,
|
||||
}}
|
||||
>
|
||||
<div className="module-sticker-picker" ref={ref} style={style}>
|
||||
<div className="module-sticker-picker__header">
|
||||
<div className="module-sticker-picker__header__packs">
|
||||
|
||||
Reference in New Issue
Block a user