summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/js/urweb.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 4daee66d..f4ed111b 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -88,7 +88,7 @@ function inp(t, s) {
var x = document.createElement(t);
x.value = s.v;
addNode(x);
- s.h = cons(function() { x.value = s.v }, s.h);
+ s.h = cons(function() { if (x.value != s.v) x.value = s.v }, s.h);
x.onkeyup = function() { sv(s, x.value) };
return x;
}