On my phone the issue is also present on that site, so it’s probably a bug with the wanakana library.
I did a bit of debugging to see what triggers the actual problem. It looks like they’re using an input event listener to detect when someone types into the IME box (registered in the libraries main bind
function used to attach it to the input box, which uses addEventListener
to set up the listener), after which they convert the text in it into kana if the event is triggered. So I made a minimal example to test how it works, using a single HTML page with only a single text input box, and the absolute bare minimum of javascript to set up an event listener and display the results, with the input handler as similar to the one the library uses:
<!DOCTYPE html>
<html>
<body>
<input id="ime">
<script>
function onInput({target}) {
alert(target.value);
}
var input = document.getElementById("ime");
input.addEventListener('input', onInput);
</script>
</body>
</html>
On my laptop it seems to only trigger the input event once per letter typed, whereas on my phone it seems to trigger it more than once for any character after the first letter entered (usually twice), which I assume is probably triggering the duplication, although I’d have to debug a bit further to make sure.
So it seems to be a bug triggered by the difference in event handling between desktop and mobile browsers (I’ve tested it both on Chrome for Android as Firefox for Android, both seem to have the same multi-event-per-single-letter problem).