Latest Ankimobile not showing all html

@dae The latest version of Anki iOS is not showing html buttons on my note types. They show up fine on desktop and used to show up fine on Anki iOS, but just recently stopped.

Here are some example note types: AnKing Note Types.apkg - Google Drive

Here is what the buttons look like on desktop:

Those buttons appear to be created with Javascript, so I’m afraid the person who wrote the JS will need to debug the issue: Styling & HTML - Anki Manual

It works fine on 2.1.80 but stopped working on 2.1.81. Was there something you changed?

Nothing obvious springs to mind

I’ve downloaded both and tried a few times. The JavaScript shows up just fine on 2.1.80 and on desktop but doesn’t show up at all on 2.1.81. I don’t think there’s anything wrong with the JavaScript… but I can ask

It appears a global variable is conflicting with one defined by the script due to changes in the minifier. I will see if something can be done on Anki’s end to fix this, but in the future, please have your developer diagnose the issue first, or avoid using Javascript.

Can do. What was the global variable? I’ll try and make more complex ones in the future so things don’t conflict. Thanks for looking into that

Your template defines setInnerHTML(), which conflicts with the one defined in AnkiMobile. It turned out not to be a minifier change; things broke because setInnerHTML was changed to be declared as const, which caused your redefinition to throw an error.

I’ve renamed the function for now to avoid the conflict.

Ok thank you!