fix close menu after clicking on selected menu bar item

This commit is contained in:
MrKinau 2023-03-31 08:55:06 +02:00
parent 72e23fc235
commit af3cfbdc55

View File

@ -15,9 +15,7 @@ class BarMenu extends Menu {
this.label = Interface.createElement('li', {class: 'menu_bar_point'}, this.name);
this.label.addEventListener('click', (event) => {
if (open_menu === scope) {
if (event instanceof PointerEvent == false) {
scope.hide()
}
scope.hide()
} else {
scope.open()
}