I study from a deck called JLPT N3 文法 sentences. In the Edit section I often add notes in the lower section called English. The two sections above that are Expression and Reading.
Before I updated to v26.xx (now 26.09.3) from 25.09.4 everything basically worked fine. But now when I add kanji with furigana and try to delete the last character (or letter) the whole word disappears. To be more precise…
In the Edit > Reading section (after adding a space) I’ll type a kanji followed by brackets and its furigana. For example, 必要[ひつよう]な.
Then I go to the back side of the card and see the word I’ve just typed. In this case 必要な.
I then copy and paste this in the English section.
All good so far. The problem occurs when I try to delete な so that it’s just 必要. At that time both kanji disappear as well, not just な. I’ve tried copying 必要 without the な (or whatever character it is) from the Reading section but then find that only 必要 will appear without the furigana. So a letter or character coming directly after the kanji is necessary in order to show the full 必要.
The reason I want to remove the hiragana next to the kanji is so that I can add a note or definition. For example, with a noun like 人間 it should be something like…
I am able to reproduce the behavior on Anki 26.09.3, macOS 27.0.1, following the OP’s steps. Putting the cursor at the end of the field and pressing the backspace key causes the entire entry to be deleted.
I’m not sure why the behavior occurs, but I note that when you expose the HTML editor for the fields:
When you type in the text, in the HTML editor you see 必要\[ひつよう\]な.
When you copy/paste the resulting text from the card preview, in the HTML editor you see <ruby>必要<rt>ひつよう</rt></ruby><span style="font-weight: 700;">な</span>.
Expose the HTML editor field by clicking on the “<>” icon in the upper right above the English field.
Either:
3a. Delete the “な” character from the HTML editor field.
3b. Or, possibly better: Select and delete the entire <span style="font-weight: 700;">な</span> text.
I also note that if you copy and paste <ruby>必要<rt>ひつよう</rt></ruby><span style="font-weight: 700;">な</span> into the HTML editor for a field, then put the cursor at the end of the field, and press the backspace key, the same entire-field-contents-get-deleted behavior occurs.
Thanks for the workaround. I tried 3a and it worked fine. I noticed in the html editor that after deleting な I had to type a space followed by another letter. For example, 必要 (space) x. If I only added a space and not the x then the cursor would stay hard up against the second kanji (in the English section). If the spacebar was then pressed to create a gap after 必要 the cursor would move to the right but it would also drag the furigana with it (to a small degree).
Anyway, it’s a good workaround and I’ll use it. I’m glad that you could reproduce it and hopefully it’ll be fixed in a future update. Thanks!
I noticed the same issue in a different deck. This topic will close soon so I was wondering if I should open a separate bug report for this at github? Or is it not necessary? Thanks.
No, the workaround works fine. It’s easier to edit in the main window rather than sift through the html code. Am not complaining though, it does the job.