- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 2k
 
Open
Description
HeroUI Version
2.8.5
Describe the bug
I needed to be able to open popover from a different spot as well as from the trigger button, and I discovered that opening it via isOpen prop makes it impossible to close it by clicking on the backdrop when Popover's backdrop is set to "opaque".
I tried adding shouldCloseOnInteractOutside callback to try and force it to work, but it never gets called in this case.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Minimal code illustrating this behavior:
const [isOpen, setIsOpen] = useState(false);
return <>
<Button onPress={()=>setIsOpen(true)}>Open Controllably</Button>
<Popover isOpen={isOpen} onOpenChange={setIsOpen} 
		shouldCloseOnInteractOutside={()=>true}
		backdrop="opaque">
	<PopoverTrigger>
		<Button>Open with Trigger</Button>
	</PopoverTrigger>
	<PopoverContent>
		Click outside to close
	</PopoverContent>
</Popover></>;Expected behavior
Expecting the popover to be dismissed by clicking on the backdrop.
Screenshots or Videos
No response
Operating System Version
MacOS
Browser
Chrome
Metadata
Metadata
Assignees
Labels
No labels