diff --git a/src/controllers/dataVerificationCtrl.js b/src/controllers/dataVerificationCtrl.js index 5251501b7..c9959deb9 100644 --- a/src/controllers/dataVerificationCtrl.js +++ b/src/controllers/dataVerificationCtrl.js @@ -1,6 +1,6 @@ import { replaceHtml } from '../utils/util'; import formula from '../global/formula'; -import { isRealNum } from '../global/validate'; +import { isRealNum, isRealNull } from '../global/validate'; import { isdatetime, diff } from '../global/datecontroll'; import { luckysheetrefreshgrid } from '../global/refresh'; import tooltip from '../global/tooltip'; @@ -1020,7 +1020,7 @@ const dataVerificationCtrl = { //数据验证未通过 let cellValue = getcellvalue(r, c, null); - if(cellValue == null || cellValue == ""){ + if(isRealNull(cellValue)){ return; } diff --git a/src/controllers/formulaBar.js b/src/controllers/formulaBar.js index 7ee5da468..29b532954 100644 --- a/src/controllers/formulaBar.js +++ b/src/controllers/formulaBar.js @@ -59,13 +59,16 @@ export function formulaBarInitial(){ formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); Store.luckysheet_select_save = [{ "row": [Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[0]], "column": [Store.luckysheetCellUpdate[1], Store.luckysheetCellUpdate[1]], "row_focus": Store.luckysheetCellUpdate[0], "column_focus": Store.luckysheetCellUpdate[1] }]; luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); - $("#luckysheet-functionbox-cell").blur(); + //$("#luckysheet-functionbox-cell").blur(); + $("#luckysheet-rich-text-editor").focus(); } event.preventDefault(); } else if (kcode == keycode.ESC && parseInt($inputbox.css("top")) > 0) { formula.dontupdate(); luckysheetMoveHighlightCell("down", 0, "rangeOfSelect"); + //$("#luckysheet-functionbox-cell").blur(); + $("#luckysheet-rich-text-editor").focus(); event.preventDefault(); } else if (kcode == keycode.F4 && parseInt($inputbox.css("top")) > 0) { @@ -224,11 +227,11 @@ export function formulaBarInitial(){ event.stopPropagation(); }); - $("#luckysheet-formula-functionrange").on("mousedown", ".luckysheet-highlight", function (e) { + $("#luckysheet-formula-functionrange").on("mousedown", ".luckysheet-highlight", function (event) { formula.rangeResize = $(this).data("type");//开始状态resize formula.rangeResizeIndex = $(this).parent().attr("rangeindex"); - let mouse = mouseposition(e.pageX, e.pageY), + let mouse = mouseposition(event.pageX, event.pageY), scrollLeft = $("#luckysheet-cell-main").scrollLeft(), scrollTop = $("#luckysheet-cell-main").scrollTop(); let x = mouse[0] + scrollLeft;