diff lib/js/urweb.js @ 1610:37f5a23446b2

Catch more <ccheckbox> events
author Adam Chlipala <adam@chlipala.net>
date Thu, 24 Nov 2011 11:41:52 -0500
parents c6cc104a47ac
children 7d459f223ac2
line wrap: on
line diff
--- a/lib/js/urweb.js	Thu Nov 24 11:27:51 2011 -0500
+++ b/lib/js/urweb.js	Thu Nov 24 11:41:52 2011 -0500
@@ -894,7 +894,7 @@
     var x = input(document.createElement("input"), s,
                   function(x) { return function(v) { if (x.checked != v) x.checked = v; }; }, "checkbox");
     x.defaultChecked = x.checked = s.data;
-    x.onclick = function() { sv(s, x.checked) };
+    x.onclick = x.onkeyup = x.oninput = x.onchange = x.onpropertychange = function() { sv(s, x.checked) };
 
     return x;
 }