Moved shortcut prevention to all modals
This commit is contained in:
parent
62587e471a
commit
1da7ee9e95
@ -29,6 +29,11 @@ function StyledModal({
|
||||
},
|
||||
}}
|
||||
{...props}
|
||||
>
|
||||
{/* Stop keyboard events when modal is open to prevent shortcuts from triggering */}
|
||||
<div
|
||||
onKeyDown={(e) => e.stopPropagation()}
|
||||
onKeyUp={(e) => e.stopPropagation()}
|
||||
>
|
||||
{children}
|
||||
{allowClose && (
|
||||
@ -38,6 +43,7 @@ function StyledModal({
|
||||
onClick={onRequestClose}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
@ -78,8 +78,13 @@ function MapMenu({
|
||||
},
|
||||
}}
|
||||
contentRef={handleModalContent}
|
||||
>
|
||||
<div
|
||||
onKeyDown={(e) => e.stopPropagation()}
|
||||
onKeyUp={(e) => e.stopPropagation()}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
@ -127,8 +127,6 @@ function TokenMenu({
|
||||
},
|
||||
}}
|
||||
autoComplete="off"
|
||||
onKeyDown={(e) => e.stopPropagation()}
|
||||
onKeyUp={(e) => e.stopPropagation()}
|
||||
/>
|
||||
</Flex>
|
||||
<Box
|
||||
|
Loading…
Reference in New Issue
Block a user