Commit 92907759 authored by Agate's avatar Agate 💬

Fixed modal focus trap

parent f6a81a9e
...@@ -43,7 +43,6 @@ export default { ...@@ -43,7 +43,6 @@ export default {
}.bind(this), }.bind(this),
onHidden: function () { onHidden: function () {
this.$emit('update:show', false) this.$emit('update:show', false)
this.focusTrap.pause()
}.bind(this), }.bind(this),
onVisible: function () { onVisible: function () {
this.focusTrap.activate() this.focusTrap.activate()
...@@ -59,11 +58,15 @@ export default { ...@@ -59,11 +58,15 @@ export default {
this.initModal() this.initModal()
this.$emit('show') this.$emit('show')
this.control.modal('show') this.control.modal('show')
this.focusTrap.activate()
this.focusTrap.unpause()
} else { } else {
if (this.control) { if (this.control) {
this.$emit('hide') this.$emit('hide')
this.control.modal('hide') this.control.modal('hide')
this.control.remove() this.control.remove()
this.focusTrap.deactivate()
this.focusTrap.pause()
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment