MDL-72361 theme_boost: page scroll issue on drawer close

This commit is contained in:
Bas Brands
2021-08-19 09:27:23 +02:00
parent 036800d99d
commit 2092500f8a
6 changed files with 9 additions and 20 deletions
+1 -12
View File
@@ -63,17 +63,6 @@ const isSmall = () => {
return browserWidth < sizes.medium;
};
/**
* Check if the user uses a medium size browser.
*
* @returns {boolean} true if the body is smaller than sizes.medium max size.
* @private
*/
const isMedium = () => {
const browserWidth = getCurrentWidth();
return (browserWidth >= sizes.medium) && (browserWidth < sizes.large);
};
/**
* Check if the user uses a large size browser.
*
@@ -340,7 +329,7 @@ export default class Drawers {
getBackdrop().then(backdrop => {
backdrop.hide();
if (isMedium()) {
if (isSmall()) {
const pageWrapper = document.getElementById('page-wrapper');
pageWrapper.style.overflow = 'auto';
}