Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@glomex/glomex-dialog

Package Overview
Dependencies
Maintainers
12
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glomex/glomex-dialog - npm Package Compare versions

Comparing version 1.11.0 to 1.12.0

48

glomex-dialog.js

@@ -315,3 +315,3 @@ const NON_VISIBLE_WIDTH = window.innerWidth < 720 ? 320 : 640;

position: fixed;
margin: 1vh auto;
margin: 5vh auto;
top: 0;

@@ -321,5 +321,5 @@ left: 50%;

z-index: ${LIGHTBOX_Z_INDEX};
max-height: 40vh;
max-height: 28vh;
max-width: 95vw;
width: 850px;
width: 1200px;
}

@@ -376,7 +376,6 @@

if (!(target instanceof GlomexDialogElement) && !target.assignedSlot) return;
this._internalModeChange = true;
if (this._wasInHiddenMode) {
this._internalModeChange = true;
this.setAttribute('mode', 'hidden');
} else {
this._internalModeChange = true;
this.setAttribute('mode', 'inline');

@@ -410,6 +409,30 @@ }

window.addEventListener('resize', onResize);
this._disconnectResize = () => {
window.removeEventListener('resize', onResize);
};
const onKeyup = (event) => {
const currentMode = this.getAttribute('mode');
if (currentMode !== 'lightbox') return;
if (event.key === 'Escape' || event.key === 'Esc') {
this._internalModeChange = true;
if (this._wasInHiddenMode) {
this.setAttribute('mode', 'hidden');
} else {
this.setAttribute('mode', 'inline');
}
}
// restrict tab behavior in lightbox mode
if (event.key === 'Tab') {
const { activeElement } = window.document;
if (activeElement !== this && !this.contains(activeElement)) {
const dialogContent = this.shadowRoot.querySelector('.dialog-content');
dialogContent.focus();
}
}
};
window.document.addEventListener('keyup', onKeyup);
this._disconnectKeyup = () => {
window.document.removeEventListener('keyup', onKeyup);
};
}

@@ -420,2 +443,3 @@

this._disconnectResize();
this._disconnectKeyup();
}

@@ -443,2 +467,5 @@

}
window.removeEventListener('touchmove', this._onNonPassiveTouchMove, {
passive: false,
});

@@ -525,6 +552,11 @@ if (newValue === 'dock') {

dialogContent.focus();
// prevent document scrolling on iOS
this._onNonPassiveTouchMove = (event) => {
event.preventDefault();
};
window.addEventListener('touchmove', this._onNonPassiveTouchMove, {
passive: false,
});
} else if (newValue === 'hidden') {
this._wasInHiddenMode = true;
} else {
this._wasInHiddenMode = false;
}

@@ -531,0 +563,0 @@

2

package.json
{
"name": "@glomex/glomex-dialog",
"version": "1.11.0",
"version": "1.12.0",
"description": "A dialog web component that allows docking a video player or putting it in a lightbox",

@@ -5,0 +5,0 @@ "type": "module",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc