summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/js/urweb.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 39701b4d..04c1cfae 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -292,11 +292,13 @@ function inp(t, s, content) {
populate(x);
addNode(x);
if (t == "select") {
- x.onchange = function() { sv(s, x.value) };
x.innerHTML = content;
- sv(s, x.value);
- } else
+ x.value = s.data;
+ x.onchange = function() { sv(s, x.value) };
+ } else {
+ x.value = s.data;
x.onkeyup = function() { sv(s, x.value) };
+ }
return x;
}