Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #89 from inkforze/minor_fixes
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
DR-Univer authored Oct 15, 2020
2 parents 4d0aa33 + f64ba54 commit 843110c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/controllers/dataVerificationCtrl.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -1020,7 +1020,7 @@ const dataVerificationCtrl = {
//数据验证未通过
let cellValue = getcellvalue(r, c, null);

if(cellValue == null || cellValue == ""){
if(isRealNull(cellValue)){
return;
}

Expand Down
9 changes: 6 additions & 3 deletions src/controllers/formulaBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 843110c

Please sign in to comment.