Skip to content

[Regression, new reviewer] Hidden type-in-the-answer field opens the keyboard #19490

@user1823

Description

@user1823

Checked for duplicates?

  • This issue is not a duplicate

Does it also happen in the desktop version?

  • This bug does not occur in the latest version of Anki Desktop

What are the steps to reproduce this bug?

I am using a custom JS code to modify the behavior of "type in the answer" template. It worked fine in the new reviewer till AnkiDroid 2.23 alpha 7 but there's a regression in alpha 8.

Minimum reproduction steps:

  1. Enable the new reviewer
  2. Enable Settings → Advanced → Type answer into the card.
  3. Use this as the front template:
<div id="front">{{Front}}</div>
<div id="type">{{type:Back}}</div>

<script>
var typeElement = document.querySelector("#type");

if (true) {
   typeElement.style.display = "none";
} 
</script>

Expected behaviour

Because the typing box is hidden, the keyboard shouldn't pop up (as in alpha 7). However, in alpha 8, the keyboard pops up.

Debug info

AnkiDroid 2.23 alpha 8

(Optional) Anything else you want to share?

No response

Research

  • I have checked the manual and the FAQ and could not find a solution to my issue
  • (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority-LowReproducedThis bug has been reproduced by a maintainer

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions