diff --git a/scripts/h5peditor-html.js b/scripts/h5peditor-html.js
index eec7ef5d9edd953cf2cf3d8b94fd1da68b1d28d5..09665080963278219b64c8c57895479c74085017 100644
--- a/scripts/h5peditor-html.js
+++ b/scripts/h5peditor-html.js
@@ -348,7 +348,9 @@ ns.Html.prototype.appendTo = function ($wrapper) {
     ns.Html.removeWysiwyg();
 
     CKEDITOR.document.getBody = function () {
-      return new CKEDITOR.dom.element(that.$item[0]);
+      // Have to attach to an element that does not get hidden or removed, since an internal "calculator" element
+      // inside CKeditor relies on this element to always exist and not be hidden.
+      return new CKEDITOR.dom.element(window.document.body);
     };
 
     ns.Html.current = that;