@vaadin/vaadin-text-field
Advanced tools
Comparing version 2.5.0-alpha2 to 2.5.0
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-text-field", | ||
"version": "2.5.0-alpha2", | ||
"version": "2.5.0", | ||
"main": "vaadin-text-field.js", | ||
@@ -16,0 +16,0 @@ "author": "Vaadin Ltd", |
@@ -33,3 +33,3 @@ /** | ||
static get version() { | ||
return '2.5.0-alpha2'; | ||
return '2.5.0'; | ||
} | ||
@@ -36,0 +36,0 @@ |
@@ -36,5 +36,27 @@ /** | ||
static get version() { | ||
return '2.5.0-alpha2'; | ||
return '2.5.0'; | ||
} | ||
static get properties() { | ||
// Hide inherited props that don't work with <input type="number"> from JSDoc. | ||
return { | ||
/** | ||
* @private | ||
*/ | ||
pattern: String, | ||
/** | ||
* @private | ||
*/ | ||
preventInvalidInput: Boolean, | ||
/** | ||
* @private | ||
*/ | ||
minlength: Number, | ||
/** | ||
* @private | ||
*/ | ||
maxlength: Number | ||
}; | ||
} | ||
ready() { | ||
@@ -41,0 +63,0 @@ super.ready(); |
@@ -16,3 +16,3 @@ /** | ||
<style> | ||
:host([readonly]) { | ||
:host([readonly]) [part\$="button"] { | ||
pointer-events: none; | ||
@@ -80,3 +80,3 @@ } | ||
static get version() { | ||
return '2.5.0-alpha2'; | ||
return '2.5.0'; | ||
} | ||
@@ -195,3 +195,3 @@ | ||
_incrementValue(incr) { | ||
if (this.disabled) { | ||
if (this.disabled || this.readonly) { | ||
return; | ||
@@ -198,0 +198,0 @@ } |
@@ -79,3 +79,3 @@ /** | ||
static get version() { | ||
return '2.5.0-alpha2'; | ||
return '2.5.0'; | ||
} | ||
@@ -82,0 +82,0 @@ |
@@ -133,3 +133,3 @@ /** | ||
static get version() { | ||
return '2.5.0-alpha2'; | ||
return '2.5.0'; | ||
} | ||
@@ -136,0 +136,0 @@ |
@@ -553,2 +553,3 @@ /** | ||
node.addEventListener('drop', this._boundOnDrop); | ||
node.addEventListener('beforeinput', this._boundOnBeforeInput); | ||
} | ||
@@ -563,2 +564,3 @@ | ||
node.removeEventListener('drop', this._boundOnDrop); | ||
node.removeEventListener('beforeinput', this._boundOnBeforeInput); | ||
} | ||
@@ -577,2 +579,3 @@ | ||
this._boundOnDrop = this._onDrop.bind(this); | ||
this._boundOnBeforeInput = this._onBeforeInput.bind(this); | ||
@@ -702,2 +705,11 @@ const defaultInput = this.shadowRoot.querySelector('[part="value"]'); | ||
_onBeforeInput(e) { | ||
// The `beforeinput` event covers all the cases for `_enabledCharPattern`: keyboard, pasting and dropping, | ||
// but it is still experimental technology so we can't rely on it. It's used here just as an additional check, | ||
// because it seems to be the only way to detect and prevent specific keys on mobile devices. See issue #429. | ||
if (this._enabledCharPattern && e.data && !this.__enabledTextRegExp.test(e.data)) { | ||
e.preventDefault(); | ||
} | ||
} | ||
__enabledCharPatternChanged(_enabledCharPattern) { | ||
@@ -704,0 +716,0 @@ this.__enabledCharRegExp = _enabledCharPattern && new RegExp('^' + _enabledCharPattern + '$'); |
@@ -106,3 +106,3 @@ /** | ||
static get version() { | ||
return '2.5.0-alpha2'; | ||
return '2.5.0'; | ||
} | ||
@@ -109,0 +109,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
102692
2351
0