Skip to content

Commit

Permalink
Revert "* modal: add disableScroll selector."
Browse files Browse the repository at this point in the history
This reverts commit c7b9891.
  • Loading branch information
catouse committed Feb 29, 2024
1 parent c7b9891 commit e347e60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/modal/src/vanilla/modal-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ export class ModalBase<T extends ModalBaseOptions = ModalBaseOptions> extends Co

this.on('hidden', () => {
if (!ModalBase.getAll().some((modal) => modal.shown)) {
$('html,body').enableScroll();
$('html').enableScroll();
}
});
this.on('show', () => {
$('html,body').disableScroll();
$('html').disableScroll();
});
if (this.shown) {
$('html,body').disableScroll();
$('html').disableScroll();
}
}

Expand Down

0 comments on commit e347e60

Please sign in to comment.