From 0d6bf0170cdf2e666a2b376853e084d45c12718b Mon Sep 17 00:00:00 2001 From: Felix Zapata Date: Wed, 21 Mar 2018 15:52:47 +0100 Subject: [PATCH] feat(iron-autogrow-textarea.html): add debounce function --- iron-autogrow-textarea.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iron-autogrow-textarea.html b/iron-autogrow-textarea.html index f46bc2d..20c8e9c 100644 --- a/iron-autogrow-textarea.html +++ b/iron-autogrow-textarea.html @@ -341,7 +341,9 @@ } this.bindValue = value; - this.$.mirror.innerHTML = this._valueForMirror(); + this.debounce('delayMirror', function() { + this.$.mirror.innerHTML = this._valueForMirror(); + }.bind(this), 500); // Manually notify because we don't want to notify until after setting value. this.fire('bind-value-changed', {value: this.bindValue});