Skip to content

Commit

Permalink
Merge pull request #7601 from Tryforce/7600-fix-menubar-click
Browse files Browse the repository at this point in the history
Fixed #7600 - menubar clicks would not properly reset state of menubar when autodisplay false
  • Loading branch information
cagataycivici authored May 10, 2019
2 parents e5c9481 + f680d76 commit 5192e9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/menubar/menubar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class MenubarSub implements OnDestroy {
return;
}

this.activeItem = this.activeMenu ? (this.activeMenu.isEqualNode(item) && this.autoDisplay ? null : item) : item;
this.activeItem = this.activeMenu ? (this.activeMenu.isEqualNode(item) ? null : item) : item;
let nextElement = <HTMLLIElement>item.children[0].nextElementSibling;
if (nextElement) {
let sublist = <HTMLUListElement>nextElement.children[0];
Expand All @@ -85,7 +85,7 @@ export class MenubarSub implements OnDestroy {

this.menuClick = true;
this.menuHoverActive = this.activeMenu ? (!this.activeMenu.isEqualNode(item)) : true;
this.activeMenu = this.activeMenu ? (this.activeMenu.isEqualNode(item) && this.autoDisplay ? null: item) : item;
this.activeMenu = this.activeMenu ? (this.activeMenu.isEqualNode(item) ? null: item) : item;
this.bindEventListener();
}
}
Expand Down

0 comments on commit 5192e9b

Please sign in to comment.