Skip to content

Commit

Permalink
Merge branch 'cyantree-issue-1815_fix-submenu-closing' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
claviska committed Feb 21, 2024
2 parents e1102ba + 298892b commit 8272619
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/menu-item/submenu-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ export class SubmenuController implements ReactiveController {
// newly opened menu.
private enableSubmenu(delay = true) {
if (delay) {
window.clearTimeout(this.enableSubmenuTimer);
this.enableSubmenuTimer = window.setTimeout(() => {
this.setSubmenuState(true);
}, this.submenuOpenDelay);
Expand All @@ -238,7 +239,7 @@ export class SubmenuController implements ReactiveController {
}

private disableSubmenu() {
clearTimeout(this.enableSubmenuTimer);
window.clearTimeout(this.enableSubmenuTimer);
this.setSubmenuState(false);
}

Expand Down

0 comments on commit 8272619

Please sign in to comment.