IME works on desktop, not on iphone

Below is link to a small deck (.08 MB). It has an in-built IME (which I didn’t write). The script works fine on desktop, but doesn’t seem to work on AnkiMobile. I’ve read that Javascript is an advanced feature, so if you don’t want to respond that’s fine. But if anyone can help, I really want this code to work on my iPhone. Any ideas how to get it to work?

I had a look at it, and it seems the cause is actually Anki. It seems like the {{type:Field}} is not supported on AnkiMobilie, which then causes the JavaScript to throw an error.

Thanks! First off, my only experience with coding is an AP Java course. I think {{type:Field}} is what makes the card type-in-the-answer. If I’m understanding you correctly, Javascript won’t work on type-in-the-answer cards on AnkiMobile? Then the solution would be to write it in CSS, but I barely even know what that means. Do you know any work-arounds? If not, I’ll probably just stick to switching my iphone keyboard.

AnkiMobile’s typing area is currently implemented outside of the webview, so it can be placed at the top of the screen, away from the on-screen keyboard. I’m afraid this means JS can’t alter its behaviour, so you’ll either need to use iOS’s Japanese keyboard, or use the ‘never type answer’ option in the preferences to disable typing on mobile.