diff --git a/source/web/scripts/ajax/xforms.js b/source/web/scripts/ajax/xforms.js index 101d5e5a90..f24a6d5bde 100644 --- a/source/web/scripts/ajax/xforms.js +++ b/source/web/scripts/ajax/xforms.js @@ -3393,6 +3393,10 @@ alfresco.xforms.Repeat = alfresco.xforms.VGroup.extend({ var fromChild = this.getChildAt(fromIndex); var toChild = this.getChildAt(toIndex); this.xform.swapRepeatItems(fromChild, toChild); + + // set tinymce current instance to null + alfresco.xforms.RichTextEditor.currentInstance = null; + var anim = dojo.lfx.html.fadeOut(fromChild.domContainer, 500); anim.onEnd = function() { @@ -3636,6 +3640,9 @@ alfresco.xforms.Repeat = alfresco.xforms.VGroup.extend({ event.stopPropagation(); if (this.isInsertRepeatItemEnabled()) { + // set tinymce current instance to null + alfresco.xforms.RichTextEditor.currentInstance = null; + this.setFocusedChild(null); var trigger = this._getRepeatItemTrigger("insert", { position: "before" }); trigger.fire();