-
We have a session timeout dialog that opens automatically after a period of inactivity, so there's no user interaction on the page. If they've opened a blueprintjs popover, for example a Select component dropdown, it remains open when the dialog is open. I need a way to programmatically close all blueprintjs popovers. I thought I could fake it by triggering |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Popovers use this Overlay behavior to close on document "mousedown" events: blueprint/packages/core/src/components/overlay/overlay.tsx Lines 594 to 596 in d8a5e6a You could try popover-programmatic-close.mov |
Beta Was this translation helpful? Give feedback.
Popovers use this Overlay behavior to close on document "mousedown" events:
blueprint/packages/core/src/components/overlay/overlay.tsx
Lines 594 to 596 in d8a5e6a
You could try
document.dispatchEvent(new MouseEvent("mousedown"))
to close an open popover. This works for me on the Popover docs page:popover-programmatic-close.mov