diff --git a/src/ui/control/DelayedPopper.tsx b/src/ui/control/DelayedPopper.tsx index 186009870..b5db74a36 100644 --- a/src/ui/control/DelayedPopper.tsx +++ b/src/ui/control/DelayedPopper.tsx @@ -53,7 +53,11 @@ class Manager extends React.PureComponent { } isInPopover(event: MouseEvent) { - for (let element of document.querySelectorAll(".popover-body").values()) { + return this.isInElements(event, ".popover-body") || this.isInElements(event, ".dropdown-menu"); + } + + isInElements(event: MouseEvent, selector: string) { + for (let element of document.querySelectorAll(selector).values()) { const r = element.getBoundingClientRect(); if (r.left <= event.clientX && r.right >= event.clientX && r.top <= event.clientY && r.bottom >= event.clientY) {