[UI] Modals should react on escape only if the container element is present.

This commit is contained in:
Fabio Manganiello 2024-09-10 22:42:50 +02:00
parent 6eb8b7954d
commit 202cff093f
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -143,7 +143,7 @@ export default {
}, },
onEscape() { onEscape() {
if (!this.isVisible || this.ignoreEscape) if (!this.isVisible || this.ignoreEscape || !this.$refs.container)
return return
const myZIndex = parseInt(getComputedStyle(this.$refs.container).zIndex) const myZIndex = parseInt(getComputedStyle(this.$refs.container).zIndex)