chanux / sayura.js

Javascript implementation of Sayura transliteration scheme
https://sayura.now.sh
MIT License
8 stars 4 forks source link

Only converts the last char #2

Open gaveen opened 11 years ago

gaveen commented 11 years ago

I guess you are only converting the last char in the web form. Which mean if you type fast enough, some chars won't be converted properly.

For example if you just type "test" fast enough (sans quotes) what you end up with is "tෙsත".

chanux commented 11 years ago

I have noticed this myself but didn't dig in to find the source yet. I think this is due to the 'hack' which is recording chars at keypress event and doing the actual conversion at keyup event (due the limitation of the two events.)

Google transliterator converts words only after a space is pressed. I think that behavior is to prevent this issue.

This is just a hunch. Gotta investigate.