Socket
Socket
Sign inDemoInstall

@vaadin/vaadin-dialog

Package Overview
Dependencies
Maintainers
16
Versions
262
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/vaadin-dialog - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1

2

package.json

@@ -13,3 +13,3 @@ {

"name": "@vaadin/vaadin-dialog",
"version": "2.4.0",
"version": "2.4.1",
"main": "vaadin-dialog.js",

@@ -16,0 +16,0 @@ "author": "Vaadin Ltd",

@@ -36,2 +36,7 @@ const TOUCH_DEVICE = (() => {

_startDrag(e) {
// Don't initiate when there's more than 1 touch (pinch zoom)
if (e.type === 'touchstart' && e.touches.length > 1) {
return;
}
if (this.draggable && (e.button === 0 || e.touches)) {

@@ -44,4 +49,3 @@ const resizerContainer = this.$.overlay.$.resizerContainer;

if ((isResizerContainer && !isResizerContainerScrollbar) || isContentPart || isDraggable) {
// Is needed to prevent text selection in Safari
!this._touchDevice && !isDraggable && e.preventDefault();
!isDraggable && e.preventDefault();
this._originalBounds = this._getOverlayBounds();

@@ -63,4 +67,3 @@ const event = this.__getMouseOrFirstTouchEvent(e);

const event = this.__getMouseOrFirstTouchEvent(e);
if (this._eventInWindow(event) &&
(e.type !== 'touchmove' || e.type === 'touchmove' && e.touches.length < 2)) {
if (this._eventInWindow(event)) {
const top = this._originalBounds.top + (event.pageY - this._originalMouseCoords.top);

@@ -67,0 +70,0 @@ const left = this._originalBounds.left + (event.pageX - this._originalMouseCoords.left);

@@ -132,2 +132,7 @@ const $_documentContainer = document.createElement('template');

_startResize(e, direction) {
// Don't initiate when there's more than 1 touch (pinch zoom)
if (e.type === 'touchstart' && e.touches.length > 1) {
return;
}
if (e.button === 0 || e.touches) {

@@ -150,4 +155,3 @@ e.preventDefault();

const event = this.__getMouseOrFirstTouchEvent(e);
if (this._eventInWindow(event) &&
(e.type !== 'touchmove' || e.type === 'touchmove' && e.touches.length < 2)) {
if (this._eventInWindow(event)) {
const minimumSize = 40;

@@ -154,0 +158,0 @@ resizer.split('').forEach((direction) => {

@@ -162,3 +162,3 @@ /**

static get version() {
return '2.4.0';
return '2.4.1';
}

@@ -272,13 +272,4 @@

});
// We need to prevent dragging behind the non-draggable content of the dialog (i.e slotted text / button)
this.$.overlay.$.content.addEventListener('touchmove', this._preventMove, {passive: false});
}
_preventMove(e) {
if (e.touches.length < 2) {
e.preventDefault();
}
}
_setTemplateFromNodes(nodes) {

@@ -285,0 +276,0 @@ this._contentTemplate = nodes.filter(node => node.localName && node.localName === 'template')[0] || this._contentTemplate;

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