Fix modal freezing fix

This commit is contained in:
George Drummond
2019-05-29 11:05:44 -04:00
parent 4e0cc26b5f
commit b9c0f13228
5 changed files with 25 additions and 26 deletions

View File

@@ -3,19 +3,11 @@ import ally from 'ally.js'
export default {
methods: {
closeModal: function(name) {
this.activeModal = null
this.$root.$emit('modalOpen', { isOpen: false, name: name })
if (this.allyHandler) this.allyHandler.disengage()
},
openModal: function(name) {
this.activeModal = name
this.$root.$emit('modalOpen', { isOpen: true, name: name })
const idSelector = `#${this.modalId}`
this.allyHandler = ally.maintain.disabled({
filter: idSelector,
})
},
// TODO: activeModal should be tracked on the root