Steps to reproduce:
- In Chromium, go to http://thottingal.in/projects/js/jquery.ime/examples/ and select Malayalam transliteration.
- Press 'c' twice. The text becomes: ക്ക്
- Press 'c', again. The text becomes: ക്ക്ൿ
- Press Backspace. The text reverts to: ക്ക്
- Press 'h'.
Observed behaviour:
At step 5, the text becomes: ച്ച് - that is, ക്ക്h has been transliterated in the context 'cc' (as if steps 3 and 4 had never happened).
Expected behaviour (as seen on Firefox):
At step 5, the text becomes: ക്ഖ് - that is, ക്ക്h has been transliterated in the context ''.
Reason:
This happens because jQuery.IME clears the context on backspace keypress, but Chromium doesn't fire keypress events for backspace or many other non-character keys. Instead, the context should be cleared on backspace keydown.