Unverified Commit e3a29d67 authored by Dannon's avatar Dannon Committed by GitHub
Browse files

Merge pull request #11962 from OlegZharkov/release_21.01

[21.01] Fix non-closing masthread downdown 
parents 7ff6a0a2 cef6bd4f
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -111,20 +111,13 @@ export default {
            return document.getElementById("galaxy_main");
        },
    },
    updated() {
        if (this.$refs.dropdown && this.galaxyIframe) {
            this.galaxyIframe.addEventListener("load", this.iframeListener);
        }
    mounted() {
        window.addEventListener("blur", this.hideDropdown);
    },
    destroyed() {
        if (this.$refs.dropdown && this.galaxyIframe) {
            this.galaxyIframe.removeEventListener("load", this.iframeListener);
        }
        window.removeEventListener("blur", this.hideDropdown);
    },
    methods: {
        iframeListener() {
            return this.galaxyIframe.contentDocument.addEventListener("click", this.hideDropdown);
        },
        hideDropdown() {
            if (this.$refs.dropdown) this.$refs.dropdown.hide();
        },