jdlorimer/chinese-support-redux

Add Dialogue Doesn't Clear Anymore After Clearing Hanzi Field And Losing Focus

Opened this issue · 2 comments

Describe the bug

Previously, when I was adding a card which was eg. a duplicate, or when I made a typo, I could erase the Hanzi field and then click elsewhere, and the rest of the card was being cleared. Now, when I clear the Hanzi field and then click elsewhere, the debris that was there before, just remains for me to clear out manually. This is very tedious (I mistype a lot :( ).

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Add'
  2. Enter some text into the Hanzi field
  3. Enable auto-fill
  4. Press "TAB"
  5. See the fields getting filled
  6. Click on the Hanzi field, erase the content.
  7. Click elsewhere - eg. other window - and see that nothing changes.

Expected behavior

I expected the other, auto-filled, fields getting erased, so I would see a completely blank card.

Screenshots
If applicable, add screenshots to help explain your problem.

Specs (please complete the following information):

  • OS: Debian 10.3 amd64
  • Anki Version v2.1.22
  • Chinese Support Version 0.13.0

Additional context

Also in the 'Add' dialogue, the Bopomofo field only fills on the first attempt, but not on subsequent attempts, and the mean word fills only sometimes. At other times, it's getting put into the "Meaning" field as CI: MW. The Cantonese field only gets updated with the first value of the Hanzi field, not with any subsequent edits of that, even after manually clearing the field first. Please see the attached screen shot, which illustrates the Bopomofo and the Cantonese field problems.
2020-05-17_17-03-anki-add-problem-2

I could try to fix this issue but before I would have to know if this is actually an intended behavior of CSR. @luoliyan should know more about it.

Pull request #138 should fix the problem.