Skip to content

Commit 8c4a840

Browse files
committed
v1.4.1, remove lockScroll after modal leave
1 parent 99a0e42 commit 8c4a840

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

dist/VueFinalModal.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/en/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,23 +282,23 @@ Custom class names for the modal content element.
282282
Custom class names for the modal overlay element.
283283

284284
### `styles`
285-
<badge>v0.17+</badge>
285+
<badge>v0.17+</badge><badge>v1.4+</badge>
286286

287287
- Type: `[String, Object, Array]`
288288
- Default: `''`
289289

290290
Style that will be applied to the modal container element.
291291

292292
### `contentStyle`
293-
<badge>v0.17+</badge>
293+
<badge>v0.17+</badge><badge>v1.4+</badge>
294294

295295
- Type: `[String, Object, Array]`
296296
- Default: `''`
297297

298298
Style that will be applied to the modal content element.
299299

300300
### `overlayStyle`
301-
<badge>v0.17+</badge>
301+
<badge>v0.17+</badge><badge>v1.4+</badge>
302302

303303
- Type: `[String, Object, Array]`
304304
- Default: `''`

lib/VueFinalModal.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,6 @@ function close() {
263263
$_vm.handleLockScroll()
264264
$_vm.focusTrap && $_vm.$focusTrap.firstElement().focus()
265265
!$_vm.hideOverlay && ($_vm.visibility.overlay = true)
266-
} else {
267-
// If the closed modal is the last one
268-
props.lockScroll && removeStyle(document.body, 'overflow')
269266
}
270267
startTransitionLeave()
271268
}
@@ -336,6 +333,8 @@ export function beforeModalLeave() {
336333
export function afterModalLeave() {
337334
modalTransitionState.value = TransitionState.Leave
338335
modalStackIndex.value = null
336+
337+
props.lockScroll && removeStyle(document.body, 'overflow')
339338
emit('closed')
340339
}
341340
export function onClickContainer() {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-final-modal",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.",
55
"private": false,
66
"main": "dist/VueFinalModal.umd.js",

0 commit comments

Comments
 (0)