mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 18:00:20 +00:00
Fix a bug with toggle method
When calling hide on invisible modal with scroll set to true (though it's meaningless), the v--modal-block-scroll class will be added to body and block the UI.
This commit is contained in:
@@ -440,6 +440,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
toggle(state, params) {
|
toggle(state, params) {
|
||||||
const { reset, scrollable, visible } = this
|
const { reset, scrollable, visible } = this
|
||||||
|
if (visible === state) return
|
||||||
const beforeEventName = visible ? 'before-close' : 'before-open'
|
const beforeEventName = visible ? 'before-close' : 'before-open'
|
||||||
|
|
||||||
if (beforeEventName === 'before-open') {
|
if (beforeEventName === 'before-open') {
|
||||||
|
|||||||
Reference in New Issue
Block a user