Fixed #167 - Dialog visuals broken when initially displayed
parent
805f352b04
commit
44a29f57a0
|
@ -64,21 +64,15 @@ export default {
|
|||
},
|
||||
documentKeydownListener: null,
|
||||
updated() {
|
||||
if (this.$refs.mask) {
|
||||
this.dialogClasses = this.$vnode.data.class;
|
||||
this.dialogStyles = this.$vnode.data.style;
|
||||
DomHandler.removeClass(this.$refs.mask, this.$vnode.data.class);
|
||||
if (this.$vnode.data.style) {
|
||||
Object.keys(this.$vnode.data.style).forEach((key) => {
|
||||
this.$refs.mask.style[key] = '';
|
||||
});
|
||||
}
|
||||
}
|
||||
this.removeStylesFromMask();
|
||||
|
||||
if (this.visible && !this.maskVisible) {
|
||||
this.maskVisible = true;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.removeStylesFromMask();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.disableModality();
|
||||
},
|
||||
|
@ -165,6 +159,18 @@ export default {
|
|||
window.document.removeEventListener('keydown', this.documentKeydownListener);
|
||||
this.documentKeydownListener = null;
|
||||
}
|
||||
},
|
||||
removeStylesFromMask() {
|
||||
if (this.$refs.mask) {
|
||||
this.dialogClasses = this.$vnode.data.class;
|
||||
this.dialogStyles = this.$vnode.data.style;
|
||||
DomHandler.removeClass(this.$refs.mask, this.$vnode.data.class);
|
||||
if (this.$vnode.data.style) {
|
||||
Object.keys(this.$vnode.data.style).forEach((key) => {
|
||||
this.$refs.mask.style[key] = '';
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
Loading…
Reference in New Issue