This commit is contained in:
Ilya Tregubov
2025-08-07 09:11:58 +03:00
3 changed files with 5 additions and 2 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3
View File
@@ -898,6 +898,8 @@ export default class Modal {
this.accessibilityShow();
this.getModal().focus();
$('body').addClass('modal-open');
const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
$('body').css({overflow: "hidden", paddingRight: `${scrollbarWidth}px`});
this.root.trigger(ModalEvents.shown, this);
dispatchEvent('core/modal:shown', this, this.modal[0]);
@@ -931,6 +933,7 @@ export default class Modal {
// Hide the backdrop if we're the last open modal.
backdrop.hide();
$('body').removeClass('modal-open');
$('body').css({overflow: "", paddingRight: ""});
}
const currentIndex = parseInt(this.root.css('z-index'));