Merge pull request #1803 from MrKinau/master

Fix: Menu won't close after deselecting it
This commit is contained in:
JannisX11 2023-04-01 21:57:02 +02:00 committed by GitHub
commit 4d0a5926c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()
}