Fix:Modal click outside srcElement null

This commit is contained in:
advplyr 2022-05-10 19:30:17 -05:00
parent 5591704aad
commit 621444114f

View File

@ -93,12 +93,13 @@ export default {
this.show = false this.show = false
}, },
clickBg(ev) { clickBg(ev) {
if (!this.show) return
if (this.preventClickoutside) { if (this.preventClickoutside) {
this.preventClickoutside = false this.preventClickoutside = false
return return
} }
if (this.processing && this.persistent) return if (this.processing && this.persistent) return
if (ev.srcElement.classList.contains('modal-bg')) { if (ev.srcElement && ev.srcElement.classList.contains('modal-bg')) {
this.show = false this.show = false
} }
}, },