Gustaf-C / anki-chinese-support-3

Anki add-on providing support for Chinese study
https://ankiweb.net/shared/info/1752008591
GNU General Public License v3.0
31 stars 8 forks source link

Plugin only works in one window at a time #27

Closed mdyan closed 10 months ago

mdyan commented 11 months ago

Describe the bug Using Chinese Support in the New Card window and Browse window one after another causes Chinese Support to break in the first window.

To Reproduce Steps to reproduce the behavior:

  1. Open Add Card Window and enable Chinese Support
  2. Open Browse window and enable Chinese Support
  3. In the browse window, Chinese Support to auto-fill a field
    • To simulate an edit, I delete the Definition field and allow Chinese Support to refill it
  4. Go back to Add Card Window and try to use Chinese Support to autofill a new word

Expected behavior Word should auto fill

Screenshots If applicable, add screenshots

螢幕擷取畫面 2023-11-05 144016

to help explain your problem.

Specs (please complete the following information):

Additional context I'm so happy this project finally has a maintainer!

As far as I know this bug always existed in the Redux as well. I'm not knowledgeable enough about the Anki plugin system to know whether this is even fixable or not. If it seems like it is, I'd be willing to attempt to fix it myself.

Gustaf-C commented 11 months ago

I just looked and there is a pull request for that on the redux version, so if you feel like giving it a shot I would very much appreciate it!

I am quite swamped with other things for the coming weeks, so I won't be able to take a stab at it for quite a while.

mdyan commented 10 months ago

@kieranlblack's approach is the right way forward, I think the method used in the previous pull request will leak memory