PopoverInteractionKind.CLICKPopover closes, even though the content of the react-select options is rendered within the popover.
Popover stays open.
To make this more interesting: I occasionally see this work exactly once. After the first time working, all following attempts fail and close the popover immediately.
this crash pretty badly with select2 too 😢
versions:
blueprint core 1.13.0 (works in 1.0.0)
select2 3.5.x
error in console:
Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
it does seem like the order of the dom nodes are different - the popover used to be rendered inside div.pt-portal span and now it renders to the top level (under body)
this was introduced in 1.3, potentially by this Fix portal/popover position and scrolling issues ?
Getting this issue too
@giladgray this bug is blocking us from upgrading beyond v1.2. Is it possible to bump the priority on this?
@sixinli @nchen63 is there anything useful in the full stack trace? that select2 error probably warrants a separate issue from this one
👨⚕️ _boom diagnosed:_

e is the event from clicking on a react-select option inside a Popover, as handled by Overlay#handleDocumentClick, and it's coming from an element that _is no longer in the document._ this means it also isn't inside the overlay container, so canOutsideClickClose instructs the overlay to close itself.
an easy workaround is using PopoverInteractionKind.CLICK_TARGET_ONLY, which disables Overlay canOutsideClickClose.
<Popover content={<Select ... />} interactionKind={PopoverInteractionKind.CLICK_TARGET_ONLY}>
Two potential fixes:
e.target.closest("body") check to Overlay#handleDocumentClickcanOutsideClickClose on Popover propsA third potential fix: Blueprint's own Select from #1159 😱
Has there been a fix for this? I tried using popover2 to see if popperjs would solve these issues but no luck.
Having any type of input or popover that bleeds over the initial popover will cause it to close.
@qcharlieshi nope, no fix implemented yet.
+1
This is an old issue, we recommend building select components using @blueprintjs/select. If you have specific problems please file a new issue and use the bug report template.
Most helpful comment
👨⚕️ _boom diagnosed:_
eis the event from clicking on a react-select option inside aPopover, as handled byOverlay#handleDocumentClick, and it's coming from an element that _is no longer in the document._ this means it also isn't inside the overlay container, socanOutsideClickCloseinstructs the overlay to close itself.an easy workaround is using
PopoverInteractionKind.CLICK_TARGET_ONLY, which disables OverlaycanOutsideClickClose.