mirror of
https://github.com/usememos/memos.git
synced 2026-11-19 10:29:11 +01:00
fix(web): restore default focus behavior in dialogs (#6279)
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user