mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 21:01:33 +02:00
Add mouse down listener in PreventSelectingEntry (#24665)
GitOrigin-RevId: 97411fd45d10b850f41c3f6269550bc6fffb0e11
This commit is contained in:
committed by
Copybot
parent
d08fa01110
commit
0f3f78cde7
@@ -1,5 +1,7 @@
|
||||
const stopPropagation = (e: React.FocusEvent | React.MouseEvent) =>
|
||||
const stopPropagation = (e: React.FocusEvent | React.MouseEvent) => {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
export const PreventSelectingEntry = ({
|
||||
children,
|
||||
@@ -8,7 +10,11 @@ export const PreventSelectingEntry = ({
|
||||
}) => {
|
||||
return (
|
||||
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
||||
<div onFocus={stopPropagation} onMouseUp={stopPropagation}>
|
||||
<div
|
||||
onMouseDown={stopPropagation}
|
||||
onFocus={stopPropagation}
|
||||
onMouseUp={stopPropagation}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user