Fix menu toggle element element hiding, better mobile support
This commit is contained in:
parent
da92796ca1
commit
5567269bf3
3 changed files with 30 additions and 16 deletions
|
@ -83,7 +83,7 @@ class ContextMenuClass {
|
|||
}
|
||||
|
||||
rightClick() {
|
||||
$('[data-action="toggleMenu"]').on('mousedown', () => {
|
||||
$('[data-action="toggleMenu"]').on('mousedown', event => {
|
||||
event.preventDefault();
|
||||
this.showMenu(event);
|
||||
});
|
||||
|
@ -173,8 +173,12 @@ class ContextMenuClass {
|
|||
});
|
||||
}
|
||||
|
||||
$(window).on('click', () => {
|
||||
$(menu).remove();
|
||||
$(window).unbind().on('click', event => {
|
||||
if($(event.target).is('.disable-menu-hide')) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
$(menu).unbind().remove();
|
||||
if(!_.isNull(this.activeLine)) this.activeLine.removeClass('active');
|
||||
});
|
||||
}
|
||||
|
|
Reference in a new issue