-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix: prevent hover events from bleeding through Code Index Config popover #7705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,19 +13,20 @@ const PopoverAnchor = PopoverPrimitive.Anchor | |
| const PopoverContent = React.forwardRef< | ||
| React.ElementRef<typeof PopoverPrimitive.Content>, | ||
| React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & Pick<PortalProps, "container"> | ||
| >(({ className, align = "center", sideOffset = 4, container, ...props }, ref) => ( | ||
| >(({ className, align = "center", sideOffset = 4, container, style, ...props }, ref) => ( | ||
| <PopoverPrimitive.Portal container={container}> | ||
| <PopoverPrimitive.Content | ||
| ref={ref} | ||
| align={align} | ||
| sideOffset={sideOffset} | ||
| className={cn( | ||
| "z-50 w-72 rounded-xs p-4 shadow-xs outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", | ||
| "z-[100] w-72 rounded-xs p-4 shadow-xs outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The z-index change from |
||
| "bg-popover", | ||
| "border border-vscode-focusBorder", | ||
| "text-popover-foreground", | ||
| className, | ||
| )} | ||
| style={{ ...style, pointerEvents: "auto" }} | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding a comment here explaining why |
||
| {...props} | ||
| /> | ||
| </PopoverPrimitive.Portal> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is setting
pointerEvents: "auto"here still necessary since it's now the default in the base PopoverContent component? We might be able to remove this explicit setting to reduce redundancy.