From 28882ddd39571c77c9116a6dd3b500c8b8cbbcc5 Mon Sep 17 00:00:00 2001 From: Geert Selderslaghs Date: Tue, 29 Oct 2024 11:03:29 +0100 Subject: [PATCH] (fix) dropdown content not visible in context with multiple triggers if parent element of latest trigger is not visible #515 --- src/dropdown.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dropdown.ts b/src/dropdown.ts index 83b5d334ee..db266ece9a 100644 --- a/src/dropdown.ts +++ b/src/dropdown.ts @@ -212,6 +212,7 @@ export class Dropdown extends Component implements Openable { _handleClick = (e: MouseEvent) => { e.preventDefault(); + this._moveDropdown((e.target).closest('li')); if (this.isOpen) { this.close(); } else { @@ -219,7 +220,8 @@ export class Dropdown extends Component implements Openable { } } - _handleMouseEnter = () => { + _handleMouseEnter = (e) => { + this._moveDropdown((e.target).closest('li')); this.open(); }