Skip to content

Commit 2fa4dcb

Browse files
authored
Merge pull request #24 from denineguy/feature/body-scroll
fixes issue with document body being unscrollable after closing multiple modals
2 parents 09e10d0 + d031655 commit 2fa4dcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

akyral-modal-behavior.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
*/
6969
function swapAndResetFocus() {
7070
this._parentEl.replaceChild(this, this._placeholder);
71-
docEl.style.overflow = lastOverflow;
71+
docEl.style.overflow = !lastModal.shown ? '' : lastOverflow;
7272
lastFocus.focus();
7373
}
7474

0 commit comments

Comments
 (0)