Having empty HTML in the add cards fields causes the field to shrink and be unusable

Also see: Can't add new contents on my Extra field

Steps to reproduce

Paste <div></div> or some other empty HTML into a field (html view) in the add cards dialog.

Expected behavior

The field should…

  1. not shrink
  2. still be usable / typable.

Actual behavior

Field shrinks and cannot be typed into anymore.

Affected versions

At least the following versions:

  1. Anki 24.11 (87ccd24e) (ao)
    Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
    Platform: Linux-6.1.0-0.deb11.21-amd64-x86_64-with-glibc2.31
  2. Anki 25.02 (038d85b1) (ao)
    Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
    Platform: Linux-6.12.19-amd64-x86_64-with-glibc2.41
  3. Anki 25.02 (8fc822a6) (src) (ao)
    Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
    Platform: Linux-6.12.19-amd64-x86_64-with-glibc2.41
    (latest main build from source today)
3 Likes

I opened a PR to close this issue:

After testing, it seems to have solved the issue.