Keyboard problem on ankidroid and answering conserved on ankiweb

Also, to be safe, best to add a check here that the DOMContentLoaded eventListener doesn’t get added multiple times on desktop. This might already be causing some weird behaviour though I’m not sure.

// Gestion de l'affichage correct du clavier virtuel à l'initialisation
var domContentLoadedListenerAdded;
if (!domContentLoadedListenerAdded) {
  domContentLoadedListenerAdded = true;
  document.addEventListener("DOMContentLoaded", () => {
    const inputField = document.getElementById("answer");
    resetState();
    triggerVirtualKeyboard(inputField);
    inputField.addEventListener("focus", () => {
      triggerVirtualKeyboard(inputField);
    });
  });
}