2.1.50 deleting images in editor

Anki 2.1.50 qt6
Windows 10 - Desktop
Add-ons disabled

When I delete an image in the editor, sometimes it deletes other images. I’ve noticed this only occurs if the other images are part of the same div tags.

Example (see image below):
I place my cursor behind the last image, hit backspace, and then all the images are deleted. The same thing happens if I try deleting the first or middle image.

If I delete the div tags, then it functions as it used to whereas hitting backspace behind one image deletes only that image.

Of note, the shortcut ctrl-z doesn’t work to return these images once deleted. Instead, I have to go to the edit menu and manually hit “Undo Update Note” one or two times.
image 2

While the div tag problem is a minor convenience, it would be very helpful if the functionality of the ctrl-z shortcut returns in a future Anki version. Thank you.

So this doesn’t occur when you press backspace in the same place in 2.1.49?

I will test it and share the result later today.

Since updating from 2.1.49 to 2.1.50 my workflow has stayed the same, so I suspect it is new.

I have confirmed it is new behavior in 2.1.50 when images are within div tags, please see the gifs below:

2.1.49
Pressing ‘backspace’ after any image only deletes that image.
2.1.49 edit


2.1.50
Pressing ‘backspace’ after any image deletes all images, and requires manually clicking undo (ctrl-z does not work).
2.1.50 edit



I also noticed this occurs when creating a new card:

2.1.50
Pressing ‘backspace’ after any image deletes all images, and ctrl-z does not work.
2.1.50 add

Thank you.

1 Like

Thanks for testing, I’ve added this to the issue tracker: backspace on a div deletes multiple images · Issue #1805 · ankitects/anki · GitHub

1 Like

Thank you. I appreciate all the work you do.

1 Like

@hengiesel deserves the credit :slight_smile:

1 Like

thanks @hengiesel :smiley:

2 Likes