@glomex/glomex-dialog
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -222,5 +222,8 @@ import { RotataToFullscreen } from './rotate-to-fullscreen.js'; | ||
// so that the user can scroll down to remove the browser bar | ||
window.document.body.style.overflow = null; | ||
if (this._bodyStyleAdjusted) { | ||
window.document.body.style.overflow = null; | ||
} | ||
} else { | ||
window.document.body.style.overflow = 'hidden'; | ||
this._bodyStyleAdjusted = true; | ||
} | ||
@@ -496,2 +499,3 @@ } | ||
this._dockTargetResizeObserver = undefined; | ||
this._bodyStyleAdjusted = false; | ||
@@ -514,2 +518,7 @@ this.addEventListener('click', ({ target }) => { | ||
connectedCallback() { | ||
if (this._bodyStyleAdjusted) { | ||
window.document.body.style.height = null; | ||
window.document.body.style.overflow = null; | ||
} | ||
this._bodyStyleAdjusted = false; | ||
updateViewPortWidth(this); | ||
@@ -587,2 +596,7 @@ updatePlaceholderAspectRatio(this, getAspectRatioFromStrings([ | ||
} | ||
if (this._bodyStyleAdjusted) { | ||
window.document.body.style.height = null; | ||
window.document.body.style.overflow = null; | ||
} | ||
this._bodyStyleAdjusted = false; | ||
} | ||
@@ -722,2 +736,3 @@ | ||
window.document.body.style.overflow = 'hidden'; | ||
this._bodyStyleAdjusted = true; | ||
dialogContent.setAttribute('style', ''); | ||
@@ -744,4 +759,6 @@ dialogInnerWrapper.setAttribute('style', ''); | ||
// reset prevent scrolling | ||
window.document.body.style.height = null; | ||
window.document.body.style.overflow = null; | ||
if (this._bodyStyleAdjusted) { | ||
window.document.body.style.height = null; | ||
window.document.body.style.overflow = null; | ||
} | ||
dialogInnerWrapper.removeAttribute('tabindex'); | ||
@@ -1046,4 +1063,6 @@ } | ||
// reset scrolling | ||
window.document.body.style.height = null; | ||
window.document.body.style.overflow = null; | ||
if (this._bodyStyleAdjusted) { | ||
window.document.body.style.height = null; | ||
window.document.body.style.overflow = null; | ||
} | ||
if (pageOverlay.parentNode === document.body) { | ||
@@ -1067,2 +1086,3 @@ document.body.removeChild(pageOverlay); | ||
window.document.body.style.overflow = 'hidden'; | ||
this._bodyStyleAdjusted = true; | ||
// place an overlay above the whole document to | ||
@@ -1069,0 +1089,0 @@ // prevent events bubbling into iframes on that page during drag |
{ | ||
"name": "@glomex/glomex-dialog", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "A dialog web component that allows docking a video player or putting it in a lightbox", | ||
@@ -5,0 +5,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123124
1255