diff --git a/frappe/public/js/frappe/form/control.js b/frappe/public/js/frappe/form/control.js index 80fbafce4a..a9ada5e180 100755 --- a/frappe/public/js/frappe/form/control.js +++ b/frappe/public/js/frappe/form/control.js @@ -1242,7 +1242,8 @@ frappe.ui.form.ControlAttachImage = frappe.ui.form.ControlAttach.extend({ var me = this; this._super(); - this.container = $('
').appendTo($(this.parent).empty()); + $(this.wrapper).detach(); + this.container = $('
').appendTo($(this.parent)); this.container.attr('data-fieldtype', this.df.fieldtype).append(this.wrapper); if(this.df.align === 'center') { this.container.addClass("flex-justify-center");