diff --git a/src/controllers/alternateformat.js b/src/controllers/alternateformat.js
index 5c0cf8f..f6bdf74 100644
--- a/src/controllers/alternateformat.js
+++ b/src/controllers/alternateformat.js
@@ -265,7 +265,7 @@ const alternateformat = {
let _this = this;
$("#luckysheet-modal-dialog-slider-alternateformat").remove();
- $("body").append(luckysheetAlternateformatHtml());
+ $("body").first().append(luckysheetAlternateformatHtml());
luckysheetsizeauto();
//关闭
@@ -727,7 +727,7 @@ const alternateformat = {
title = alternatingColors.selectionCellColor;
}
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-alternateformat-colorSelect-dialog",
"addclass": "luckysheet-alternateformat-colorSelect-dialog",
"title": title,
@@ -801,7 +801,7 @@ const alternateformat = {
const alternatingColors =_locale.alternatingColors;
const locale_button = _locale.button;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-alternateformat-rangeDialog",
"addclass": "luckysheet-alternateformat-rangeDialog",
"title": alternatingColors.selectRange,
diff --git a/src/controllers/cellFormat.js b/src/controllers/cellFormat.js
index 415b794..f034294 100644
--- a/src/controllers/cellFormat.js
+++ b/src/controllers/cellFormat.js
@@ -114,7 +114,7 @@ function initialCellFormatModel(){
const locale_button = _locale.button;
//Password input initial
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-cellFormat-config",
"addclass": "luckysheet-cellFormat-config",
"title": local_cellFormat.cellFormatTitle,
diff --git a/src/controllers/conditionformat.js b/src/controllers/conditionformat.js
index 90f9e15..cd76fbd 100644
--- a/src/controllers/conditionformat.js
+++ b/src/controllers/conditionformat.js
@@ -1431,7 +1431,7 @@ const conditionformat = {
const conditionformat_Text = locale().conditionformat;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-singleRange-dialog",
"addclass": "luckysheet-singleRange-dialog",
"title": conditionformat_Text.selectCell,
@@ -1461,7 +1461,7 @@ const conditionformat = {
const conditionformat_Text = locale().conditionformat;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-multiRange-dialog",
"addclass": "luckysheet-multiRange-dialog",
"title": conditionformat_Text.selectRange,
@@ -1571,7 +1571,7 @@ const conditionformat = {
const conditionformat_Text = locale().conditionformat;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-conditionformat-dialog",
"addclass": "luckysheet-conditionformat-dialog",
"title": title,
@@ -1662,7 +1662,7 @@ const conditionformat = {
`;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-CFicons-dialog",
"addclass": "luckysheet-CFicons-dialog",
"title": conditionformat_Text.icons,
@@ -1724,7 +1724,7 @@ const conditionformat = {
`;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-administerRule-dialog",
"addclass": "luckysheet-administerRule-dialog",
"title": conditionformat_Text.conditionformatManageRules,
@@ -1990,7 +1990,7 @@ const conditionformat = {
'' +
'';
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-newConditionRule-dialog",
"addclass": "luckysheet-newEditorRule-dialog",
"title": conditionformat_Text.newFormatRule,
@@ -2091,7 +2091,7 @@ const conditionformat = {
'' +
'';
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-editorConditionRule-dialog",
"addclass": "luckysheet-newEditorRule-dialog",
"title": conditionformat_Text.editFormatRule,
@@ -2249,7 +2249,7 @@ const conditionformat = {
infoDialog: function(title, content){
$("#luckysheet-modal-dialog-mask").show();
$("#luckysheet-conditionformat-info-dialog").remove();
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-conditionformat-info-dialog",
"addclass": "",
"title": title,
diff --git a/src/controllers/dataVerificationCtrl.js b/src/controllers/dataVerificationCtrl.js
index a84f12a..a13a94f 100644
--- a/src/controllers/dataVerificationCtrl.js
+++ b/src/controllers/dataVerificationCtrl.js
@@ -226,7 +226,7 @@ const dataVerificationCtrl = {
`;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-dataVerification-dialog",
"addclass": "luckysheet-dataVerification-dialog",
"title": toolbarText.dataVerification,
@@ -965,7 +965,7 @@ const dataVerificationCtrl = {
$("#luckysheet-modal-dialog-mask").hide();
$("#luckysheet-dataVerificationRange-dialog").remove();
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-dataVerificationRange-dialog",
"addclass": "luckysheet-dataVerificationRange-dialog",
"title": dvText.selectCellRange,
diff --git a/src/controllers/dropCell.js b/src/controllers/dropCell.js
index ee5f928..769244c 100644
--- a/src/controllers/dropCell.js
+++ b/src/controllers/dropCell.js
@@ -304,7 +304,7 @@ const luckysheetDropCell = {
$("#luckysheet-dropCell-typeList").remove();
const _locale = locale();
const locale_dropCell = _locale.dropCell;
- $("body").append(replaceHtml(_this.typeListHtml,{
+ $("body").first().append(replaceHtml(_this.typeListHtml,{
copyCell:locale_dropCell.copyCell,
sequence:locale_dropCell.sequence,
onlyFormat:locale_dropCell.onlyFormat,
diff --git a/src/controllers/filter.js b/src/controllers/filter.js
index 26d1152..419307e 100644
--- a/src/controllers/filter.js
+++ b/src/controllers/filter.js
@@ -860,7 +860,7 @@ function initialFilterHandler(){
}
//颜色筛选子菜单
$("#luckysheet-filter-orderby-color-submenu").remove();
- $("body").append('
');
+ $("body").first().append('');
let $t = $("#luckysheet-filter-orderby-color-submenu").end();
let $con = $(this).parent();
let winW = $(window).width(), winH = $(window).height();
diff --git a/src/controllers/hyperlinkCtrl.js b/src/controllers/hyperlinkCtrl.js
index 906d997..303112b 100644
--- a/src/controllers/hyperlinkCtrl.js
+++ b/src/controllers/hyperlinkCtrl.js
@@ -74,7 +74,7 @@ const hyperlinkCtrl = {
`;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-insertLink-dialog",
"addclass": "luckysheet-insertLink-dialog",
"title": toolbarText.insertLink,
diff --git a/src/controllers/ifFormulaGenerator.js b/src/controllers/ifFormulaGenerator.js
index 04fec34..b5b8114 100644
--- a/src/controllers/ifFormulaGenerator.js
+++ b/src/controllers/ifFormulaGenerator.js
@@ -363,7 +363,7 @@ const ifFormulaGenerator = {
''+
''+ifListHtml+'
';
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-ifFormulaGenerator-dialog",
"addclass": "luckysheet-ifFormulaGenerator-dialog",
"title": locale_formula.ifGenerate,
@@ -428,7 +428,7 @@ const ifFormulaGenerator = {
value = "";
}
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-ifFormulaGenerator-singleRange-dialog",
"addclass": "luckysheet-ifFormulaGenerator-singleRange-dialog",
"title": locale_formula.ifGenTipSelectCell,
@@ -452,7 +452,7 @@ const ifFormulaGenerator = {
const locale_formula = _locale.formula;
const locale_button = _locale.button;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-ifFormulaGenerator-multiRange-dialog",
"addclass": "luckysheet-ifFormulaGenerator-multiRange-dialog",
"title": locale_formula.ifGenTipSelectRange,
@@ -541,7 +541,7 @@ const ifFormulaGenerator = {
const _locale = locale();
const locale_button = _locale.button;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-ifFormulaGenerator-info",
"addclass": "",
"title": title,
diff --git a/src/controllers/imageCtrl.js b/src/controllers/imageCtrl.js
index 3120654..7d945ad 100644
--- a/src/controllers/imageCtrl.js
+++ b/src/controllers/imageCtrl.js
@@ -208,7 +208,7 @@ const imageCtrl = {
$("#luckysheet-modal-dialog-slider-imageCtrl").remove();
let sliderHtml = _this.getSliderHtml();
- $("body").append(sliderHtml);
+ $("body").first().append(sliderHtml);
luckysheetsizeauto();
let imgItem = _this.images[_this.currentImgId];
@@ -239,7 +239,7 @@ const imageCtrl = {
$("#luckysheet-modal-dialog-mask").show();
$("#luckysheet-imageCtrl-colorSelect-dialog").remove();
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-imageCtrl-colorSelect-dialog",
"addclass": "luckysheet-imageCtrl-colorSelect-dialog",
"title": locale_imageCtrl.borderTile,
diff --git a/src/controllers/insertFormula.js b/src/controllers/insertFormula.js
index 2b030fb..a85bdca 100644
--- a/src/controllers/insertFormula.js
+++ b/src/controllers/insertFormula.js
@@ -135,7 +135,7 @@ const insertFormula = {
$("#luckysheet-search-formula-parm-select").remove();
if($(this).parents(".parmBox").find(".txt input").val() == ""){
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-search-formula-parm-select",
"addclass": "luckysheet-search-formula-parm-select",
"title": locale_formulaMore.tipSelectDataRange,
@@ -145,7 +145,7 @@ const insertFormula = {
}));
}
else{
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-search-formula-parm-select",
"addclass": "luckysheet-search-formula-parm-select",
"title": locale_formulaMore.tipSelectDataRange,
@@ -190,7 +190,7 @@ const insertFormula = {
$("#luckysheet-modal-dialog-mask").show();
$("#luckysheet-search-formula").remove();
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-search-formula",
"addclass": "luckysheet-search-formula",
"title": "",
@@ -276,7 +276,7 @@ const insertFormula = {
$("#luckysheet-modal-dialog-mask").hide();
$("#luckysheet-search-formula-parm").remove();
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-search-formula-parm",
"addclass": "luckysheet-search-formula-parm",
"title": parm_title,
diff --git a/src/controllers/locationCell.js b/src/controllers/locationCell.js
index 8e64beb..8231553 100644
--- a/src/controllers/locationCell.js
+++ b/src/controllers/locationCell.js
@@ -90,7 +90,7 @@ const luckysheetLocationCell = {
''+
'';
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-locationCell-dialog",
"addclass": "luckysheet-locationCell-dialog",
"title": locale_location.location,
diff --git a/src/controllers/menuButton.js b/src/controllers/menuButton.js
index d1202eb..edc3385 100644
--- a/src/controllers/menuButton.js
+++ b/src/controllers/menuButton.js
@@ -465,7 +465,7 @@ const menuButton = {
let submenu = replaceHtml(_this.menu, {"id": "fmtOtherSelf", "item": subitemset, "subclass": "luckysheet-menuButton-sub"});
//luckysheet-icon-fmt-other-menuButton_sub
- $("body").append(menu+submenu);
+ $("body").first().append(menu+submenu);
$menuButton = $("#" + menuButtonId).width(250);
_this.focus($menuButton);
@@ -539,7 +539,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, {"id": "font-family", "item": itemset, "subclass": "", "sub": ""});
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#"+menuButtonId).width(200);
_this.focus($menuButton);
@@ -601,7 +601,7 @@ const menuButton = {
let coloritem = replaceHtml(_this.coloritem, {"class": "luckysheet-icon-alternateformat", "name": locale_toolbar.alternatingColors+"..."});
let menu = replaceHtml(_this.color, {"id":menuButtonId, "coloritem": coloritem, "colorself": subid, "sub": "","resetColor":locale_toolbar.resetColor});
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#" + menuButtonId);
$("#" + menuButtonId).find(".luckysheet-color-selected").spectrum({
@@ -739,7 +739,7 @@ const menuButton = {
let coloritem = replaceHtml(_this.coloritem, { "class": "luckysheet-icon-alternateformat", "name": locale_toolbar.alternatingColors+"..." });
let menu = replaceHtml(_this.color, { "id": menuButtonId, "coloritem": coloritem, "colorself": subid, "sub": "","resetColor":locale_toolbar.resetColor });
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#" + menuButtonId);
$("#" + menuButtonId).find(".luckysheet-color-selected").spectrum({
@@ -903,7 +903,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, { "id": "font-size", "item": itemset, "subclass": "", "sub": "" });
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#" + menuButtonId).width(150);
_this.focus($menuButton, 10);
@@ -1091,7 +1091,7 @@ const menuButton = {
let subcolormenuid = "luckysheet-icon-borderColor-menuButton";
let colormenu = replaceHtml(_this.color, { "id": subcolormenuid, "coloritem": "", "colorself": "", "sub": "luckysheet-menuButton-sub",resetColor:locale_toolbar.resetColor });
- $("body").append(menu + colormenu + submenu);
+ $("body").first().append(menu + colormenu + submenu);
$menuButton = $("#" + menuButtonId).width(170);
_this.focus($menuButton, "border-all");
@@ -1337,7 +1337,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, { "id": "merge-menu", "item": itemset, "subclass": "", "sub": "" });
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#"+menuButtonId);
_this.focus($menuButton);
@@ -1431,7 +1431,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, { "id": "align-menu", "item": itemset, "subclass": "", "sub": "" });
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#" + menuButtonId).width(120);
_this.focus($menuButton);
@@ -1492,7 +1492,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, { "id": "valign-menu", "item": itemset, "subclass": "", "sub": "" });
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#" + menuButtonId).width(120);
_this.focus($menuButton, "bottom");
@@ -1544,7 +1544,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, { "id": "textwrap-menu", "item": itemset, "subclass": "", "sub": "" });
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#" + menuButtonId).width(120);
_this.focus($menuButton, "clip");
@@ -1599,7 +1599,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, { "id": "rotation-menu", "item": itemset, "subclass": "", "sub": "" });
- $("body").append(menu);
+ $("body").first().append(menu);
// 文字旋转总 Stack Vertically 太长了,拉宽到160
$menuButton = $("#" + menuButtonId).width(160);
@@ -1656,7 +1656,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, { "id": "freezen-menu", "item": itemset, "subclass": "", "sub": "" });
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#" + menuButtonId).width(170);
$menuButton.find(".luckysheet-cols-menuitem").click(function(){
@@ -1980,7 +1980,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, {"id":"autofilter", "item": itemset, "subclass":"", "sub":""});
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#" + menuButtonId).width(150);
$menuButton.find(".luckysheet-cols-menuitem").click(function(){
@@ -2049,7 +2049,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, { "id": "seachmore", "item": itemset, "subclass": "", "sub": "" });
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#" + menuButtonId).width(180);
$menuButton.find(".luckysheet-cols-menuitem").click(function(){
@@ -2177,7 +2177,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, { "id": "function-menu", "item": itemset, "subclass": "", "sub": "" });
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#" + menuButtonId).width(180);
$menuButton.find(".luckysheet-cols-menuitem").click(function(){
@@ -2454,7 +2454,7 @@ const menuButton = {
let subitemset6 = _this.createButtonMenu(subitemdata6);
let submenu6 = replaceHtml(_this.menu, {"id": "deleteRule", "item": subitemset6, "subclass":"luckysheet-menuButton-sub"});
- $("body").append(menu + submenu + submenu2 + submenu3 + submenu4 + submenu6);
+ $("body").first().append(menu + submenu + submenu2 + submenu3 + submenu4 + submenu6);
$menuButton = $("#" + menuButtonId).width(190);
$("#luckysheet-icon-highlightCellRule-menuButton").width(160);
$("#luckysheet-icon-projectSelectRule-menuButton").width(180);
@@ -2859,7 +2859,7 @@ const menuButton = {
let itemset = _this.createButtonMenu(itemdata);
let menu = replaceHtml(_this.menu, {"id": "postil", "item": itemset, "subclass": "", "sub": ""});
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#"+menuButtonId).width(150);
$menuButton.find(".luckysheet-cols-menuitem").click(function(){
@@ -2921,7 +2921,7 @@ const menuButton = {
let menu = replaceHtml(_this.menu, { "id": "print", "item": itemset, "subclass": "", "sub": "" });
- $("body").append(menu);
+ $("body").first().append(menu);
$menuButton = $("#" + menuButtonId).width(180);
$menuButton.find(".luckysheet-cols-menuitem").click(function(){
@@ -2949,7 +2949,7 @@ const menuButton = {
mouseclickposition($menuButton, menuleft, $(this).offset().top + 25, "lefttop");
});
- $("body").on("mouseover mouseleave",".luckysheet-menuButton .luckysheet-cols-submenu", function(e){
+ $("body").first().on("mouseover mouseleave",".luckysheet-menuButton .luckysheet-cols-submenu", function(e){
let $t = $(this), attrid = $t.attr("itemvalue"),
$attr = $("#luckysheet-icon-" + attrid + "-menuButton");
diff --git a/src/controllers/moreFormat.js b/src/controllers/moreFormat.js
index d8d71a3..553c82f 100644
--- a/src/controllers/moreFormat.js
+++ b/src/controllers/moreFormat.js
@@ -1127,7 +1127,7 @@ const luckysheetMoreFormat = {
'';
}
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-moreFormat-dialog",
"addclass": "luckysheet-moreFormat-dialog",
"title": title,
diff --git a/src/controllers/orderBy.js b/src/controllers/orderBy.js
index 116acc9..36ad806 100644
--- a/src/controllers/orderBy.js
+++ b/src/controllers/orderBy.js
@@ -66,7 +66,7 @@ export function orderByInitial(){
let content = ` + ${locale_sort.addOthers}
`;
- $("body").append(replaceHtml(modelHTML, { "id": "luckysheet-sort-dialog", "addclass": "", "title": _locale.sort.sortTitle, "content": content, "botton": ``}));
+ $("body").first().append(replaceHtml(modelHTML, { "id": "luckysheet-sort-dialog", "addclass": "", "title": _locale.sort.sortTitle, "content": content, "botton": ``}));
$("#luckysheet-sort-dialog .luckysheet-sort-dialog-additem").click(function () {
let last = Store.luckysheet_select_save[0];
diff --git a/src/controllers/pivotTable.js b/src/controllers/pivotTable.js
index 252994f..5f23076 100644
--- a/src/controllers/pivotTable.js
+++ b/src/controllers/pivotTable.js
@@ -916,18 +916,18 @@ const pivotTable = {
- $("body").append(luckysheetPivotTableHTML());
+ $("body").first().append(luckysheetPivotTableHTML());
$("#luckysheet-modal-dialog-slider-close").click(function () {
$("#luckysheet-modal-dialog-slider-pivot").hide();
luckysheetsizeauto();
});
- $("body").append(replaceHtml(modelHTML, { "id": "luckysheet-data-pivotTable-selection", "addclass": "luckysheet-data-pivotTable-selection", "title": locale_pivotTable.titleSelectionDataRange, "content": '', "botton": '' }));
+ $("body").first().append(replaceHtml(modelHTML, { "id": "luckysheet-data-pivotTable-selection", "addclass": "luckysheet-data-pivotTable-selection", "title": locale_pivotTable.titleSelectionDataRange, "content": '', "botton": '' }));
- $("body").append(replaceHtml(filtermenuHTML(), { "menuid": "pivotTableFilter" }));
- $("body").append(replaceHtml(filtersubmenuHTML(), { "menuid": "pivotTableFilter" }));
- $("body").append(pivottableconfigHTML());
- $("body").append(pivottablesumHTML());
+ $("body").first().append(replaceHtml(filtermenuHTML(), { "menuid": "pivotTableFilter" }));
+ $("body").first().append(replaceHtml(filtersubmenuHTML(), { "menuid": "pivotTableFilter" }));
+ $("body").first().append(pivottableconfigHTML());
+ $("body").first().append(pivottablesumHTML());
$("#luckysheet-pivotTableFilter-orderby-asc").remove();
$("#luckysheet-pivotTableFilter-orderby-desc").next().remove();
@@ -1940,7 +1940,7 @@ const pivotTable = {
_this.movesave.index = $cur.data("index");
if ($("#luckysheet-modal-dialog-slider-pivot-move").length == 0) {
- $("body").append('' + _this.movesave.name + '
');
+ $("body").first().append('' + _this.movesave.name + '
');
}
_this.movesave.width = $("#luckysheet-modal-dialog-slider-pivot-move").outerWidth();
diff --git a/src/controllers/protection.js b/src/controllers/protection.js
index b987e29..2e58e0d 100644
--- a/src/controllers/protection.js
+++ b/src/controllers/protection.js
@@ -469,7 +469,7 @@ function initialProtectionRangeModal(file){
let _locale = locale();
let local_protection = _locale.protection;
const locale_button = _locale.button;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-protection-rangeItem-dialog",
"addclass": "luckysheet-protection-rangeItem-dialog",
"title": local_protection.allowRangeTitle,
@@ -597,11 +597,11 @@ function initialProtectionRIghtBar(file){
`;
- $("body").append(protectionModalHtml);
+ $("body").first().append(protectionModalHtml);
//Password input initial for sheet Protection
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-protection-sheet-validation",
"addclass": "luckysheet-protection-sheet-validation",
"title": local_protection.validationTitle,
@@ -787,7 +787,7 @@ function openRangePasswordModal(rangeAut) {
if(!initialRangePasswordHtml){
//Password input initial for range
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-protection-range-validation",
"addclass": "luckysheet-protection-sheet-validation",
"title": local_protection.validationTitle,
diff --git a/src/controllers/resize.js b/src/controllers/resize.js
index 79c801d..ac2ae93 100644
--- a/src/controllers/resize.js
+++ b/src/controllers/resize.js
@@ -103,10 +103,10 @@ export default function luckysheetsizeauto(isRefreshCanvas=true) {
`,
// Add style left:$$('.luckysheet') left, when the worksheet does not fill the full screen
- morediv = '';
+ morediv = '';
if($("#luckysheet-icon-morebtn-div").length == 0){
- $("body").append(morediv);
+ $("body").first().append(morediv);
}
// $("#luckysheet-icon-morebtn-div").hide();
@@ -175,7 +175,7 @@ export default function luckysheetsizeauto(isRefreshCanvas=true) {
$$('#luckysheet-icon-morebtn-div').style.left = containerLeft + 'px';
}
- let right = $(window).width() - $("#luckysheet-icon-morebtn").offset().left - $("#luckysheet-icon-morebtn").width()+ $("body").scrollLeft();
+ let right = $(window).width() - $("#luckysheet-icon-morebtn").offset().left - $("#luckysheet-icon-morebtn").width()+ $("body").first().scrollLeft();
// $("#luckysheet-icon-morebtn-div").toggle().css("right", right < 0 ? 0 : right);
diff --git a/src/controllers/searchReplace.js b/src/controllers/searchReplace.js
index 51c54ba..cc6e925 100644
--- a/src/controllers/searchReplace.js
+++ b/src/controllers/searchReplace.js
@@ -56,7 +56,7 @@ const luckysheetSearchReplace = {
'' +
'';
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-search-replace",
"addclass": "luckysheet-search-replace",
"title": "",
diff --git a/src/controllers/splitColumn.js b/src/controllers/splitColumn.js
index 8675c97..4122388 100644
--- a/src/controllers/splitColumn.js
+++ b/src/controllers/splitColumn.js
@@ -57,7 +57,7 @@ const luckysheetSplitColumn = {
'' +
'';
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-splitColumn-dialog",
"addclass": "luckysheet-splitColumn-dialog",
"title": locale_splitText.splitTextTitle,
diff --git a/src/global/createdom.js b/src/global/createdom.js
index ebb2485..6d2cd55 100644
--- a/src/global/createdom.js
+++ b/src/global/createdom.js
@@ -104,13 +104,13 @@ export default function luckysheetcreatedom(colwidth, rowheight, data, menu, tit
$("#luckysheet-scrollbar-y div").height(Store.rh_height + Store.columnHeaderHeight - Store.cellMainSrollBarSize - 3);
//新建行菜单
- $("body").append(maskHTML);
- $("body").append(colsmenuHTML);
- $("body").append(rightclickHTML());
- $("body").append(inputHTML);
- $("body").append(replaceHtml(filtermenuHTML(), { "menuid": "filter" }));
- $("body").append(replaceHtml(filtersubmenuHTML(), { "menuid": "filter" }));
- $("body").append(sheetconfigHTML());
+ $("body").first().append(maskHTML);
+ $("body").first().append(colsmenuHTML);
+ $("body").first().append(rightclickHTML());
+ $("body").first().append(inputHTML);
+ $("body").first().append(replaceHtml(filtermenuHTML(), { "menuid": "filter" }));
+ $("body").first().append(replaceHtml(filtersubmenuHTML(), { "menuid": "filter" }));
+ $("body").first().append(sheetconfigHTML());
$("#luckysheet-rows-h").width((Store.rowHeaderWidth-1.5));
$("#luckysheet-cols-h-c").height((Store.columnHeaderHeight-1.5));
diff --git a/src/global/formula.js b/src/global/formula.js
index 71fda9c..9609910 100755
--- a/src/global/formula.js
+++ b/src/global/formula.js
@@ -992,7 +992,7 @@ const luckysheetformula = {
let _this = this;
if ($("#luckysheet-formula-search-c").length == 0) {
- $("body").append(_this.searchHTML);
+ $("body").first().append(_this.searchHTML);
$("#luckysheet-formula-search-c").on("mouseover", ".luckysheet-formula-search-item", function () {
$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active");
$(this).addClass("luckysheet-formula-search-item-active");
@@ -1114,7 +1114,7 @@ const luckysheetformula = {
let _locale = locale();
let locale_formulaMore = _locale.formulaMore;
if ($("#luckysheet-formula-help-c").length == 0) {
- $("body").after(replaceHtml(_this.helpHTML, {
+ $("body").first().after(replaceHtml(_this.helpHTML, {
helpClose: locale_formulaMore.helpClose,
helpCollapse: locale_formulaMore.helpCollapse,
helpExample: locale_formulaMore.helpExample,
diff --git a/src/global/tooltip.js b/src/global/tooltip.js
index 9270957..45bd58d 100644
--- a/src/global/tooltip.js
+++ b/src/global/tooltip.js
@@ -12,7 +12,7 @@ const tooltip = {
let _locale = locale();
let locale_button = _locale.button;
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-info",
"addclass": "",
"title": title,
@@ -41,7 +41,7 @@ const tooltip = {
name2 = locale_button.cancel;
}
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-confirm",
"addclass": "",
"style": "z-index:100003",
@@ -77,7 +77,7 @@ const tooltip = {
const locale_screenshot = _locale.screenshot;
$("#luckysheet-modal-dialog-mask").show();
$("#luckysheet-confirm").remove();
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": "luckysheet-confirm",
"addclass": "",
"style": "z-index:100003",
@@ -128,7 +128,7 @@ const tooltip = {
});
},
chartPointConfig: function (id, savefunc1, closefunc2) {
- $("body").append(replaceHtml(modelHTML, {
+ $("body").first().append(replaceHtml(modelHTML, {
"id": id,
"addclass": "luckysheet-chart-point-config-c",
"title": "数据点批量设置",
@@ -191,7 +191,7 @@ const tooltip = {
}
if ($toolup.length == 0) {
- $("body").append(luckysheetToolHTML);
+ $("body").first().append(luckysheetToolHTML);
$toolup = $("#luckysheet-tooltip-up");
}
@@ -229,7 +229,7 @@ const tooltip = {
let htmldiv = ''+locale_paint.start+'
'+ btntxt +'
';
$("#luckysheetpopover").remove();
- $("body").append(htmldiv);
+ $("body").first().append(htmldiv);
$("#luckysheetpopover .luckysheetpopover-content").html(content);
let w = $("#luckysheetpopover").outerWidth(),