Ajatt-Tools / PasteImagesAsWebP

🍙 An Anki add-on that makes your images small.
https://ankiweb.net/shared/info/1151815987
GNU Affero General Public License v3.0
22 stars 5 forks source link

Drag & Drop to Edit Window while Reviewing changes focus from Edit window to Review window #27

Closed kanjieater closed 7 months ago

kanjieater commented 7 months ago

Noticed some odd behavior, so I figured I'd request to get it changed to match how Anki works without the add-on in a consistent way. Steps to reproduce:

  1. Review Cards
  2. Decide to add an image to a card & open the edit dialog
  3. Drag an image to the Image field of the Edit dialog
  4. The review window takes focus, a tooltip is shown, and the edit dialog box is still opened (and depending on where you opened the edit dialog, potentially covered by the review window which took focus)

The request would be to have the edit window stay in focus, and not do any focus switching to the review window when using drag & drop, just like when the add-on is not installed.

(PS: I'm going from 22GBs of images to 3GBs. Thank you for making this.)

tatsumoto-ren commented 7 months ago

I didn't notice any focus changes but this is probably because I use i3wm, which you should do too 😏

Maybe the focus shifts because the parent of the tooltip is set to mw. I guess it should be the current window instead.

Assigned parents wherever tooltip was called.

kanjieater commented 7 months ago

That fixed it. Thank you for saving me so much disk space and making this easy to use!

tatsumoto-ren commented 7 months ago

Glad it helped!