From 05a1e9583df3d4ca8490f5b0d0cc89a02ac8b522 Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Tue, 3 Nov 2015 12:37:24 +0100 Subject: [PATCH] Fix using value$ on input element --- src/lib/annotations/annotations.html | 2 +- test/unit/bind-elements.html | 36 ++++++++++++++++------------ test/unit/bind.html | 12 +++++++++- 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/src/lib/annotations/annotations.html b/src/lib/annotations/annotations.html index fe03ea6531..8b23976cfe 100644 --- a/src/lib/annotations/annotations.html +++ b/src/lib/annotations/annotations.html @@ -313,7 +313,7 @@ // `value` attribute if it previously had a value (can't // unconditionally set '' before removing since attributes with `$` // can't be set using setAttribute) - if (node.localName == 'input' && name == 'value') { + if (node.localName === 'input' && origName === 'value') { node.setAttribute(origName, ''); } // Remove annotation diff --git a/test/unit/bind-elements.html b/test/unit/bind-elements.html index 1c5b36c4c5..1ff374171d 100644 --- a/test/unit/bind-elements.html +++ b/test/unit/bind-elements.html @@ -434,20 +434,26 @@ - - + + - + } + }); + + + + + diff --git a/test/unit/bind.html b/test/unit/bind.html index 842b0073df..6769651bda 100644 --- a/test/unit/bind.html +++ b/test/unit/bind.html @@ -16,7 +16,6 @@ -