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

fix: 解决嵌入luckysheet时,点击外部保存,单元格编辑内容未更新保存问题 #1386

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/controllers/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,13 @@ export default function luckysheetHandler() {
menuButton.inputMenuButtonFocus(e.target);
});

// 点击视图外部任意处,退出编辑模式
$("#luckysheet-rich-text-editor").on('blur', function(e){
if(e.relatedTarget) return
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
luckysheetMoveHighlightCell("down", 0, "rangeOfSelect");
})

//表格mousedown
$("#luckysheet-cell-main, #luckysheetTableContent")
.mousedown(function(event) {
Expand Down