Switch scrollbars on slideshow.js

This commit is contained in:
ferferga
2020-05-17 00:33:02 +02:00
parent 8cbec3fe22
commit 7aa34f1be2
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -124,3 +124,7 @@ div[data-role=page] {
.force-scroll {
overflow-y: scroll;
}
.hide-scroll {
overflow-y: hidden;
}
+6
View File
@@ -603,6 +603,9 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
*/
self.show = function () {
createElements(options);
// Hides page scrollbar
document.body.classList.remove('force-scroll');
document.body.classList.add('hide-scroll');
};
/**
@@ -611,6 +614,9 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
self.hide = function () {
if (dialog) {
dialogHelper.close(dialog);
// Shows page scrollbar
document.body.classList.remove('hide-scroll');
document.body.classList.add('force-scroll');
}
};
};