krassowski / Anki-Night-Mode

Enabling studying at night with Anki - without eye strain
https://ankiweb.net/shared/info/1496166067
GNU General Public License v3.0
72 stars 13 forks source link

Deleting a line break in the Add Note dialog causes the next line to have white background #27

Closed slaren closed 6 years ago

slaren commented 7 years ago

For example, starting with this: image Pressing the delete key to remove the line break at the end of line 1 makes the content of the previous line 2 have a white background, with this result: image

This is with Anki Version 2.1.0beta13.

krassowski commented 7 years ago

Thanks for the report, I have seen this happening too. This looks like an outstanding part of an upstream issue of Anki editor itself: https://anki.tenderapp.com/discussions/beta-testing/840-copy-paste-in-anki-editor-causes-copied-text-to-include-redundant-tags-which-is-deterimental-to-ux-when-using-night-mode-addon. If you have a bit of time more you can report this issue to Anki support but please check if it still happens in Anki 2.1 beta 21.

slaren commented 7 years ago

I see, I also noticed strange behaviour from the editor before installing the addon, but I didn't realize it is the same issue, thanks for the info. It still happens with 2.1 beta 23 unfortunately.

omega3 commented 6 years ago

It happens to me in Anki 2.1.4 Qt 5.9.2 PyQt 5.9 on Manjaro Linux Plasma 5.13.5, QT 5.11.1 with add-on Night Mode 2.1.9

omega3 commented 6 years ago

Damien says:

If this is an issue that only occurs when the add-on is enabled, I think it's the responsibility of the add-on author to address it.

https://anki.tenderapp.com/discussions/beta-testing/840-copy-paste-in-anki-editor-causes-copied-text-to-include-redundant-tags-which-is-deterimental-to-ux-when-using-night-mode-addon

Indeed. It doesn't occur to me when night-mode is disabled.

krassowski commented 6 years ago

I see. It's a pity that no underlying cause was found. Anyway, I developed a workaround which will be included in the next release of the add-on.

krassowski commented 6 years ago

The new version is available.

omega3 commented 6 years ago

Unfortunately I still have this in Night Mode 2.2.0.

I can provide a debugging information if you tell me how. There is debug-console in Anki but I don't know if it will show anything about add-ons. https://apps.ankiweb.net/docs/manual.html#debug-console

If Damien refuses to help maybe it would be a good idea to write about it for example on reddit anki so that other developers may have a look. Also many users use Night Mode. Maybe some more feedback will be beneficial. I can do it.

krassowski commented 6 years ago

Sure, I am happy to get as much feedback as we can. I also got a message that the workaround causes some nasty issues on macOS (as everything does) so it will need to be reworked anyway. Thank you for your help @omega3

krassowski commented 6 years ago

Hi @omega3,

I released 2.2.2 version in which (I hope that) I dealt with most of the different scenarios leading to appearance of the white backgrounds. Please let me know if it works for you.

omega3 commented 6 years ago

I upgraded and seems to be ok. Although when I go to end of the line (end of sentence) and press delete, when there is a text in next line that is moved to the first line (where mouse pointer is, I mean to the end of sentence) for a short moment a white line appears and than a normal white text on dark background. But this is very fast and not a problem.

Other than everything seems to be ok.

krassowski commented 6 years ago

I am afraid there is not much I can do about that, but since - as you said - it's only a minor thing, I will assume that we can close this issue for now. If you find anything new please let me know.

And thanks for your help again!