From 4f9f0a6c0c8fd06b2d1c9667d8a67354b5a64a78 Mon Sep 17 00:00:00 2001 From: DemoJx <13416669291@163.com> Date: Tue, 8 Aug 2023 14:46:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=B5=8C=E5=85=A5luck?= =?UTF-8?q?ysheet=E6=97=B6=EF=BC=8C=E7=82=B9=E5=87=BB=E5=A4=96=E9=83=A8?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=EF=BC=8C=E5=8D=95=E5=85=83=E6=A0=BC=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=86=85=E5=AE=B9=E6=9C=AA=E6=9B=B4=E6=96=B0=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/handler.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/controllers/handler.js b/src/controllers/handler.js index 4e494073..90ed6b4c 100644 --- a/src/controllers/handler.js +++ b/src/controllers/handler.js @@ -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) {