[whatwg] set input.value when input element has composition string

Makoto Kato m_kato at ga2.so-net.ne.jp
Thu Feb 24 22:16:34 PST 2011


Hi,

This is simple sample.  This behavior is different on all web browsers 
when input element has composition/preedit string for IME.

If input element has composition string by IME, should it cancel 
composition string and set value by script?  Or should it cancel setting 
value since it has composition string?


<script>
function setvalue() {
   document.getElementById('test').value = "replaced";
}
</script>
<body onload="setTimeout('setvalue()',5000)">
<input type="text" id="test"/>
</body>


-- Makoto Kato


More information about the whatwg mailing list