diff --git a/core/frontend/src/components/canvas/customComponent/DeFrame.vue b/core/frontend/src/components/canvas/customComponent/DeFrame.vue index bbbc271cd1..8cdb35040a 100644 --- a/core/frontend/src/components/canvas/customComponent/DeFrame.vue +++ b/core/frontend/src/components/canvas/customComponent/DeFrame.vue @@ -10,7 +10,7 @@ :src="element.frameLinks.src" scrolling="auto" frameborder="0" - class="main-frame" + class="main-frame main-de-iframe " @load="loaded" @error="onError" /> @@ -103,6 +103,14 @@ export default { mounted() { bus.$on('frameLinksChange-' + this.element.id, this.frameLinksChange) eventBus.$on('startMoveIn', this.frameLinksChange) + window.addEventListener('click', function(event) { + const iframes = document.getElementsByClassName('main-de-iframe') + if (iframes) { + iframes.forEach(function(iframe) { + iframe.contentWindow.postMessage('closeFilterComponent', '*') + }) + } + }) }, beforeDestroy() { bus.$off('frameLinksChange-' + this.element.id, this.frameLinksChange) diff --git a/core/frontend/src/components/widget/deWidget/DeDate.vue b/core/frontend/src/components/widget/deWidget/DeDate.vue index b027c2b814..65a4c9d5b6 100644 --- a/core/frontend/src/components/widget/deWidget/DeDate.vue +++ b/core/frontend/src/components/widget/deWidget/DeDate.vue @@ -341,6 +341,12 @@ export default { if (this.inDraw) { bus.$on("reset-default-value", this.resetDefaultValue); } + const _this = this + window.addEventListener('message', function(event) { + if (event.data === 'closeFilterComponent') { + _this.$refs.dateRef.hidePicker() + } + }) }, beforeDestroy() { this.clearTime();