@vaadin/vaadin-text-field
Advanced tools
Comparing version 2.3.0-alpha1 to 2.3.0-alpha2
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-text-field", | ||
"version": "2.3.0-alpha1", | ||
"version": "2.3.0-alpha2", | ||
"main": "vaadin-text-field.js", | ||
@@ -16,0 +16,0 @@ "author": "Vaadin Ltd", |
@@ -80,3 +80,3 @@ /** | ||
static get version() { | ||
return '2.3.0-alpha1'; | ||
return '2.3.0-alpha2'; | ||
} | ||
@@ -83,0 +83,0 @@ |
@@ -93,2 +93,12 @@ /** | ||
} | ||
@keyframes vaadin-text-area-appear { | ||
to { | ||
opacity: 1; | ||
} | ||
} | ||
:host { | ||
animation: 1ms vaadin-text-area-appear; | ||
} | ||
</style> | ||
@@ -122,3 +132,3 @@ | ||
static get version() { | ||
return '2.3.0-alpha1'; | ||
return '2.3.0-alpha2'; | ||
} | ||
@@ -135,4 +145,11 @@ | ||
this._updateHeight(); | ||
this.addEventListener('animationend', this._onAnimationEnd); | ||
} | ||
_onAnimationEnd(e) { | ||
if (e.animationName.indexOf('vaadin-text-area-appear') === 0) { | ||
this._updateHeight(); | ||
} | ||
} | ||
_textAreaValueChanged(value) { | ||
@@ -139,0 +156,0 @@ this._updateHeight(); |
@@ -290,2 +290,6 @@ /** | ||
_onChange(e) { | ||
if (this._valueClearing) { | ||
return; | ||
} | ||
// In the Shadow DOM, the `change` event is not leaked into the | ||
@@ -345,2 +349,3 @@ // ancestor tree, so we must do this manually. | ||
this.$.clearButton.addEventListener('mousedown', () => this._valueClearing = true); | ||
this.$.clearButton.addEventListener('click', this._onClearButtonClick.bind(this)); | ||
@@ -377,2 +382,4 @@ this.addEventListener('keydown', this._onKeyDown.bind(this)); | ||
this.clear(); | ||
this._valueClearing = false; | ||
this.focusElement.dispatchEvent(new Event('change', {bubbles: true})); | ||
} | ||
@@ -379,0 +386,0 @@ |
@@ -103,3 +103,3 @@ /** | ||
static get version() { | ||
return '2.3.0-alpha1'; | ||
return '2.3.0-alpha2'; | ||
} | ||
@@ -106,0 +106,0 @@ |
68163
1388