mirror of
https://github.com/usememos/memos.git
synced 2025-12-17 22:28:52 +08:00
fix: prevent default focus behavior on open and close events in sheet (#4998)
This commit is contained in:
parent
76ca258f23
commit
5ba81d629c
1 changed files with 7 additions and 0 deletions
|
|
@ -72,6 +72,13 @@ const SheetContent = React.forwardRef<
|
||||||
"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
|
onOpenAutoFocus={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
}}
|
||||||
|
onCloseAutoFocus={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
document.body.style.pointerEvents = "auto";
|
||||||
|
}}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue