context-menu: double click issue in submenus on small touch screens
This commit is contained in:
parent
2225a3f760
commit
d673cb1e3a
2 changed files with 6 additions and 0 deletions
|
|
@ -50,6 +50,7 @@ class ContextMenu extends UiWidget {
|
|||
})
|
||||
|
||||
this.container.addEventListener('touchstart', (e)=>{
|
||||
if (e.target.classList.contains('has-sub')) e.preventDefault()
|
||||
if (!e.target.classList.contains('focus')) {
|
||||
DOM.each(e.target.parentNode, '.focus', (el)=>{
|
||||
el.classList.remove('focus')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue