Closed
Description
modal-open
class of body element remains despite the modal has closed when the modal's show()
and hide()
are called repeatedly and asynchronously.
data-modal-open-count
attribute value does not return to 0 also.
Exsample
<template>
<div>
<h1>bootstrap-vue 2.0.0-dev</h1>
<b-modal ref="modal">modal</b-modal>
<b-button @click="onClick">show and hide and show modal</b-button>
</div>
</template>
<script>
export default {
name: 'App2',
methods: {
onClick () {
setTimeout(() => { this.$refs.modal.show() }, 100)
setTimeout(() => { this.$refs.modal.hide() }, 200)
setTimeout(() => { this.$refs.modal.show() }, 300)
}
}
}
</script>
data-modal-open-count
is 2 when 'show and hide and show modal' button is clicked. After the modal has closed, data-modal-open-count
is 1, and modal-open
class remains.
Environment
OS: Windows 10 (1803)
Browser: Chrome (70.0.3538.110), Edge (42.17134.1.0), Firefox (63.0.3), IE11 (11.407.17134.0)
Bootstrap-Vue: HEAD of dev
branch (8b8272b)