UserAction Delay AnkiMobile

Hello,
I was noticing that on my iPad AnkiMobile that the custom user actions have a 1-2 second delay most of the time when opening a button from the Anking Overhaul Deck. This is referring to the AnKing Note Types (Easy Customization) - AnkiWeb addon. For example I have below uploaded in the desktop addon. (User Action 2 - Toggle Next Button)

And this below in the AnkiMobile addon. (Options - User Action 2)

On the desktop version it is instant. On finger tapping the button on ankimobile it is instant. I am using an Xbox One Wireless controller. The other buttons such as answering yes, no, suspend, undo, are all instant. Is the custom user action supposed to have a delay?

@dae @AnKingMed

If you try the following in a new profile, putting this in your card template and then triggering user action 1, is it instant for you? It is for me, which makes me think this may be an issue with the code the add-on generates.

<script>
function userJs1() {
if (document.body.style.backgroundColor === "red") {
  document.body.style.backgroundColor = "green"
} else {
  document.body.style.backgroundColor = "red"
}
}
</script>

I’m the developer who added support for user actions to the AnKing Note Types add-on. The add-on only assigns one of the following expressions to the the userJs variables:

1 Like

The example I provided is instant on an xbox wireless controller for me. I suggest a) testing the example to confirm it’s consistent for you, and b) combining it with one of these routines to see if that removes the delay. It’s possible that it’s an iOS webview bug, where it’s not refreshing the framebuffer fast enough.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.