Skip to content
This repository has been archived by the owner on May 25, 2018. It is now read-only.

Commit

Permalink
modal: fixed animation bug on hide.
Browse files Browse the repository at this point in the history
  • Loading branch information
wffranco committed Sep 19, 2016
1 parent f9a1f9c commit b128d87
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<slot name="modal-header">
<div class="modal-header">
<button type="button" class="close" @click="close"><span>&times;</span></button>
<h4 class="modal-title" >
<h4 class="modal-title">
<slot name="title">
{{title}}
</slot>
Expand Down Expand Up @@ -108,17 +108,17 @@ export default {
body.style.paddingRight = scrollBarWidth + 'px'
}
if (this.backdrop) {
$(el).on('click', (e) => {
$(el).on('click', e => {
if (e.target === el) this.show = false
})
}
} else {
$(el).on('transitionend', () => {
body.style.paddingRight = null
$(body).removeClass('modal-open')
$(el).removeClass('in').on('transitionend', () => {
$(el).off('click transitionend')
el.style.display = 'none'
body.style.paddingRight = '0'
}).removeClass('in')
$(body).removeClass('modal-open')
})
}
}
},
Expand Down

0 comments on commit b128d87

Please sign in to comment.