Skip to content

Commit

Permalink
Merge pull request #519 from gselderslaghs/dropdown-menu-visibility
Browse files Browse the repository at this point in the history
(fix) Dropdown menu visibility #515
  • Loading branch information
wuda-io authored Nov 6, 2024
2 parents 61bcd91 + 28882dd commit 0fc1800
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,16 @@ export class Dropdown extends Component<DropdownOptions> implements Openable {

_handleClick = (e: MouseEvent) => {
e.preventDefault();
this._moveDropdown((<HTMLElement>e.target).closest('li'));
if (this.isOpen) {
this.close();
} else {
this.open();
}
}

_handleMouseEnter = () => {
_handleMouseEnter = (e) => {
this._moveDropdown((<HTMLElement>e.target).closest('li'));
this.open();
}

Expand Down

0 comments on commit 0fc1800

Please sign in to comment.