Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea-extracted.js

Issue 1401633002: Update Polymer from 1.1.4 -> 1.1.5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dzhioev@ review Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea-extracted.js
index 3ad2dc6d7b1b762730287499ed09f4564086a416..f0c8b0fb48f8ce9e4e6d1b5b3fee74259457bdc9 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-autogrow-textarea/iron-autogrow-textarea-extracted.js
@@ -1,6 +1,4 @@
-
-
- Polymer({
+Polymer({
is: 'iron-autogrow-textarea',
@@ -188,7 +186,14 @@
return;
}
- textarea.value = this.bindValue;
+ // If the bindValue changed manually, then we need to also update
+ // the underlying textarea's value. Otherwise this change was probably
+ // generated from the _onInput handler, and the two values are already
+ // the same.
+ if (textarea.value !== this.bindValue) {
+ textarea.value = !(this.bindValue || this.bindValue === 0) ? '' : this.bindValue;
+ }
+
this.$.mirror.innerHTML = this._valueForMirror();
// manually notify because we don't want to notify until after setting value
this.fire('bind-value-changed', {value: this.bindValue});
@@ -229,4 +234,4 @@
_computeValue: function() {
return this.bindValue;
}
- });
+ });

Powered by Google App Engine
This is Rietveld 408576698