fix(menu): overlays can block menu closing

fixes #15880
This commit is contained in:
Manu Mtz.-Almeida
2018-10-08 13:31:27 -05:00
parent e51f1f36f1
commit 11aa241dac
5 changed files with 53 additions and 17 deletions

View File

@ -203,7 +203,7 @@ export class Menu implements ComponentInterface, MenuI {
this.updateState();
}
@Listen('body:click', { enabled: false, capture: true })
@Listen('click', { enabled: false, capture: true })
onBackdropClick(ev: any) {
if (this.lastOnEnd < ev.timeStamp - 100) {
const shouldClose = (ev.composedPath)
@ -412,7 +412,7 @@ export class Menu implements ComponentInterface, MenuI {
}
// add/remove backdrop click listeners
this.enableListener(this, 'body:click', isOpen);
this.enableListener(this, 'click', isOpen);
if (isOpen) {
// add css class