# HG changeset patch # User Adam Chlipala # Date 1242507564 14400 # Node ID 50b4825115f01edc5db23780e0a30a9b04071ce3 # Parent c1f8963ebb186d256f0c2e409af0ae0894d64faf Fix initialization of cselect from source diff -r c1f8963ebb18 -r 50b4825115f0 lib/js/urweb.js --- a/lib/js/urweb.js Sat May 16 16:37:48 2009 -0400 +++ b/lib/js/urweb.js Sat May 16 16:59:24 2009 -0400 @@ -292,11 +292,13 @@ populate(x); addNode(x); if (t == "select") { + x.innerHTML = content; + x.value = s.data; x.onchange = function() { sv(s, x.value) }; - x.innerHTML = content; - sv(s, x.value); - } else + } else { + x.value = s.data; x.onkeyup = function() { sv(s, x.value) }; + } return x; }