Hide tooltips when context menu opens

This commit is contained in:
nathan 2023-09-13 14:05:50 -06:00
parent e323cd1d79
commit 4a7f775a97
2 changed files with 13 additions and 1 deletions

View File

@ -11,12 +11,12 @@
import {_egw_active_menu, egwMenu, egwMenuItem} from "./egw_menu";
import {EGW_KEY_ENTER, EGW_KEY_MENU} from "./egw_action_constants";
import {tapAndSwipe} from "../tapandswipe";
import {EgwAction} from "./EgwAction";
import {EgwFnct} from "./egw_action_common";
import "./egwGlobal"
import {EgwActionImplementation} from "./EgwActionImplementation";
import {EgwActionObject} from "./EgwActionObject";
import {EgwPopupAction} from "./EgwPopupAction";
import {egw} from "../jsapi/egw_global";
export class EgwPopupActionImplementation implements EgwActionImplementation {
type = "popup";
@ -243,6 +243,9 @@ export class EgwPopupActionImplementation implements EgwActionImplementation {
e = window.event;
}
// Close any open tooltip so they don't get in the way
egw(window).tooltipCancel();
if (_egw_active_menu) {
_egw_active_menu.hide();
} else if (!e.ctrlKey && e.which == 3 || e.which === 0 || e.type === 'tapandhold') // tap event indicates by 0

View File

@ -251,6 +251,15 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd)
tooltip_div.fadeOut(100);
tooltip_div.remove();
}
},
/**
* Hide tooltip, cancel the timer
*/
tooltipCancel: function ()
{
hide();
current_elem = null;
}
};