Skip to content

Commit

Permalink
fix remove correct image in edit element content picture
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro Baccanelli authored and tvdeyen committed Jun 11, 2020
1 parent 69fefff commit 751a3df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/assets/javascripts/alchemy/alchemy.base.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ $.extend Alchemy,
removePicture: (selector) ->
$form_field = $(selector)
$element = $form_field.closest(".element-editor")
$content = $form_field.closest(".content_editor")
if $form_field[0]
$form_field.val ""
$element.find(".thumbnail_background").html('<i class="icon far fa-image fa-fw"/>')
$content.find(".thumbnail_background").html('<i class="icon far fa-image fa-fw"/>')
Alchemy.setElementDirty $element
false

Expand Down

0 comments on commit 751a3df

Please sign in to comment.