From 9abc9ada2c2f9e369098b7ab8db3a831690fbb14 Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Sun, 10 Sep 2023 20:55:51 +0100 Subject: :bug: Fixed some bugs with the 'value' attribute not setting properly. --- lib/src/runtime.ffi.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/runtime.ffi.mjs b/lib/src/runtime.ffi.mjs index bab3a57..dd02f8b 100644 --- a/lib/src/runtime.ffi.mjs +++ b/lib/src/runtime.ffi.mjs @@ -181,6 +181,8 @@ function morphAttr(el, name, value, dispatch) { switch (typeof value) { case "string": if (el.getAttribute(name) !== value) el.setAttribute(name, value); + if (value === "") el.removeAttribute(name); + if (name === "value" && el.value !== value) el.value = value; break; // Event listeners need to be handled slightly differently because we need -- cgit v1.2.3