aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2023-09-10 20:55:51 +0100
committerHayleigh Thompson <me@hayleigh.dev>2023-09-10 20:55:51 +0100
commit9abc9ada2c2f9e369098b7ab8db3a831690fbb14 (patch)
treedfa2ca51566d6c5c283db6ae678a84fdbe916255
parent04940ddb730d23a7b8c05cf11ad9a8801ab99bf9 (diff)
downloadlustre-9abc9ada2c2f9e369098b7ab8db3a831690fbb14.tar.gz
lustre-9abc9ada2c2f9e369098b7ab8db3a831690fbb14.zip
:bug: Fixed some bugs with the 'value' attribute not setting properly.
-rw-r--r--lib/src/runtime.ffi.mjs2
1 files changed, 2 insertions, 0 deletions
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