mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Prevent scrolling of the page when modals are displayed (#5816)
* prevent scroll-chaining in modals * make body overflow hidden to prevent background scrolling
This commit is contained in:
parent
c9af04d0e5
commit
a409536ad0
@ -243,6 +243,7 @@ Modal.prototype.adjustPageClass = function() {
|
||||
if(windowContainer) {
|
||||
$tw.utils.toggleClass(windowContainer,"tc-modal-displayed",this.modalCount > 0);
|
||||
}
|
||||
$tw.utils.toggleClass(this.srcDocument.body,"tc-modal-prevent-scroll",this.modalCount > 0);
|
||||
};
|
||||
|
||||
exports.Modal = Modal;
|
||||
|
@ -1,6 +1,6 @@
|
||||
created: 20140912145537860
|
||||
footer: <$button message="tm-close-tiddler">Close</$button>
|
||||
modified: 20140912145537861
|
||||
modified: 20210627054504823
|
||||
subtitle: I'm a modal wizard
|
||||
title: SampleWizard
|
||||
type: text/vnd.tiddlywiki
|
||||
|
@ -1942,6 +1942,9 @@ html body.tc-body.tc-single-tiddler-window {
|
||||
border-top: 1px solid <<colour modal-footer-border>>;
|
||||
}
|
||||
|
||||
.tc-modal-prevent-scroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
** Centered modals
|
||||
|
Loading…
Reference in New Issue
Block a user