@vaadin/vaadin-dialog
Advanced tools
Comparing version 2.3.0-alpha4 to 2.3.0-alpha5
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-dialog", | ||
"version": "2.3.0-alpha4", | ||
"version": "2.3.0-alpha5", | ||
"main": "vaadin-dialog.js", | ||
@@ -16,0 +16,0 @@ "author": "Vaadin Ltd", |
@@ -0,1 +1,10 @@ | ||
const TOUCH_DEVICE = (() => { | ||
try { | ||
document.createEvent('TouchEvent'); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
})(); | ||
/** | ||
@@ -6,2 +15,11 @@ * @polymerMixin | ||
class VaadinDialogDraggableMixin extends superClass { | ||
static get properties() { | ||
return { | ||
_touchDevice: { | ||
type: Boolean, | ||
value: TOUCH_DEVICE | ||
} | ||
}; | ||
} | ||
ready() { | ||
@@ -26,2 +44,4 @@ super.ready(); | ||
if ((isResizerContainer && !isResizerContainerScrollbar) || isContentPart || isDraggable) { | ||
// Is needed to prevent text selection in Safari | ||
!this._touchDevice && !isDraggable && e.preventDefault(); | ||
this._originalBounds = this._getOverlayBounds(); | ||
@@ -28,0 +48,0 @@ const event = this.__getMouseOrFirstTouchEvent(e); |
@@ -162,3 +162,3 @@ /** | ||
static get version() { | ||
return '2.3.0-alpha4'; | ||
return '2.3.0-alpha5'; | ||
} | ||
@@ -165,0 +165,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
40643
686