Fixed modal focus trap
This commit is contained in:
parent
f6a81a9ecf
commit
929077594d
|
@ -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 {
|
||||||
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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue