Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix(web): restore default focus behavior in dialogs (#6279)

icif0ee2fd4484e
diff --git a/web/src/components/ui/dialog.tsx b/web/src/components/ui/dialog.tsx
index 482e990ce..c35b96ee8 100644
--- a/web/src/components/ui/dialog.tsx
+++ b/web/src/components/ui/dialog.tsx
@@ -55,13 +55,7 @@ const DialogContent = React.forwardRef<
>(({ className, children, showCloseButton = true, size, ...props }, ref) => (
<DialogPortal>
<DialogOverlay />
- <DialogPrimitive.Popup
- ref={ref}
- className={cn(dialogContentVariants({ size }), className)}
- initialFocus={false}
- finalFocus={false}
- {...props}
- >
+ <DialogPrimitive.Popup ref={ref} className={cn(dialogContentVariants({ size }), className)} {...props}>
<div className="overflow-y-auto overflow-x-hidden flex-1 flex flex-col gap-4">{children}</div>
{showCloseButton && (
<DialogPrimitive.Close className="ring-offset-background absolute top-4 end-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4">