Skip to content
Snippets Groups Projects
Commit 7ae7f47c authored by Samuel Degueldre's avatar Samuel Degueldre
Browse files

[FIX] web_editor: stop base 64 being saved in the DOM when recropping


When saving after cropping an attachment, a new cropped attachment is
created, and the temporary base64 URL is replaced by the url of the new
attachment. However, when cropping an image for a second time, the
original image is recropped, and the cropped image attachment that was
created previously is overriden with the new data.

Previously, the step that overrides the temporary base64 url with the
url of the croppped attachment was not present when overriding a
previously cropped attachment, meaning it would be saved as is in the
DOM, and the overriden attachment would no longer have any links
pointing to it. This commit fixes that by overriding the temporary
base64 url both when cropping for the first time, but also for
subsequent re-crops of the same image.

closes odoo/odoo#47836

X-original-commit: 3b23f137
Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent 915abb53
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment