Parcourir la source

[fix] detach instead of emptying parent (#3783)

version-14
Prateeksha Singh il y a 8 ans
committed by Rushabh Mehta
Parent
révision
c2f18dd9e4
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. +2
    -1
      frappe/public/js/frappe/form/control.js

+ 2
- 1
frappe/public/js/frappe/form/control.js Voir le fichier

@@ -1242,7 +1242,8 @@ frappe.ui.form.ControlAttachImage = frappe.ui.form.ControlAttach.extend({
var me = this;
this._super();

this.container = $('<div class="control-container">').appendTo($(this.parent).empty());
$(this.wrapper).detach();
this.container = $('<div class="control-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");


Chargement…
Annuler
Enregistrer