Having SVGs in the button for popover/menus etc would cause the detection for if you're clicking the button to fail, causing the popover to close then immediately reopen, effectively staying open.
This PR changes the instanceof HTMLElement check to instead check for instanceof Node which will include SVGElements and includes the only method currently used on the target which is .contains
Having SVGs in the button for popover/menus etc would cause the detection for if you're clicking the button to fail, causing the popover to close then immediately reopen, effectively staying open.
This PR changes the
instanceof HTMLElement
check to instead check forinstanceof Node
which will includeSVGElement
s and includes the only method currently used on the target which is.contains
This should fix #62