mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05:00
clear io image field when resetting in add mode (#3794)
This commit is contained in:
parent
10a7e84f13
commit
4d3b2d0352
1 changed files with 5 additions and 0 deletions
|
|
@ -471,6 +471,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
isIOImageLoaded = false;
|
||||
globalThis.canvas.clear();
|
||||
globalThis.canvas = undefined;
|
||||
if (imageOcclusionMode?.kind === "add") {
|
||||
// canvas.clear indirectly calls saveOcclusions
|
||||
saveFieldNow();
|
||||
fieldStores[ioFields.image].set("");
|
||||
}
|
||||
const page = document.querySelector(".image-occlusion");
|
||||
if (page) {
|
||||
page.remove();
|
||||
|
|
|
|||
Loading…
Reference in a new issue