diff --git a/src/components/MdMenu/MdMenuContent.vue b/src/components/MdMenu/MdMenuContent.vue index b8d0de99d..7ff07c489 100644 --- a/src/components/MdMenu/MdMenuContent.vue +++ b/src/components/MdMenu/MdMenuContent.vue @@ -199,7 +199,13 @@ return this.$refs.menu ? this.$refs.menu.contains(target) : false }, isBackdropExpectMenu ($event) { - return !this.$el.contains($event.target) && !this.isMenu($event) + const contains = (el, target) => { + if ('contains' in el) { + return el.contains(target) + } + return el.compareDocumentPosition(target) & 16 + } + return !contains(this.$el, $event.target) && !this.isMenu($event) }, createClickEventObserver () { if (document) {