menu: use click event in *toggle modes

This commit is contained in:
jean-emmanuel 2026-03-02 10:27:42 +01:00
parent 270eb77802
commit 9961fb73b4
2 changed files with 4 additions and 2 deletions

View file

@ -7,6 +7,8 @@
- rgb: fix rendering issue
- patchbay: interaction and rendering issues
- `event.preventDefault` in `onTouch` now affect modal buttons
- menu: use click event instead of tap in `toggle` and `doubleTap-toggle` modes
- editor
- preserve code editor undo history between consecutive edits of a same widget's property

View file

@ -96,7 +96,7 @@ class Menu extends MenuBase {
doubleTap(this, (e)=>{
if (this.opened) return
this.open(e)
}, {element: this.widget})
}, {element: this.widget, click: this.mode.includes('toggle')})
this.on('draginit',(e)=>{
@ -113,7 +113,7 @@ class Menu extends MenuBase {
} else {
this.on('draginit',(e)=>{
this.on(this.mode.includes('toggle') ? 'click' : 'draginit',(e)=>{
if (this.opened && this.mode.includes('toggle')) {