@vaadin/vaadin-dialog
Advanced tools
Comparing version 2.3.0-alpha3 to 2.3.0-alpha4
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-dialog", | ||
"version": "2.3.0-alpha3", | ||
"version": "2.3.0-alpha4", | ||
"main": "vaadin-dialog.js", | ||
@@ -16,0 +16,0 @@ "author": "Vaadin Ltd", |
@@ -25,3 +25,2 @@ /** | ||
if ((isResizerContainer && !isResizerContainerScrollbar) || isContentPart || isDraggable) { | ||
!isDraggable && e.preventDefault(); | ||
this._originalBounds = this._getOverlayBounds(); | ||
@@ -43,3 +42,4 @@ const event = this.__getMouseOrFirstTouchEvent(e); | ||
const event = this.__getMouseOrFirstTouchEvent(e); | ||
if (this._eventInWindow(event)) { | ||
if (this._eventInWindow(event) && | ||
(e.type !== 'touchmove' || e.type === 'touchmove' && e.touches.length < 2)) { | ||
const top = this._originalBounds.top + (event.pageY - this._originalMouseCoords.top); | ||
@@ -46,0 +46,0 @@ const left = this._originalBounds.left + (event.pageX - this._originalMouseCoords.left); |
@@ -148,3 +148,4 @@ const $_documentContainer = document.createElement('template'); | ||
const event = this.__getMouseOrFirstTouchEvent(e); | ||
if (this._eventInWindow(event)) { | ||
if (this._eventInWindow(event) && | ||
(e.type !== 'touchmove' || e.type === 'touchmove' && e.touches.length < 2)) { | ||
const minimumSize = 40; | ||
@@ -151,0 +152,0 @@ resizer.split('').forEach((direction) => { |
@@ -162,3 +162,3 @@ /** | ||
static get version() { | ||
return '2.3.0-alpha3'; | ||
return '2.3.0-alpha4'; | ||
} | ||
@@ -272,4 +272,13 @@ | ||
}); | ||
// 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) { | ||
@@ -371,3 +380,5 @@ this._contentTemplate = nodes.filter(node => node.localName && node.localName === 'template')[0] || this._contentTemplate; | ||
_bringOverlayToFront() { | ||
this.$.overlay.bringToFront(); | ||
if (this.modeless) { | ||
this.$.overlay.bringToFront(); | ||
} | ||
} | ||
@@ -374,0 +385,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
40226
668
0