From 6d79d120221e137fee0e56f7906b81038d34da36 Mon Sep 17 00:00:00 2001 From: chends Date: Mon, 4 Sep 2023 15:27:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=9C=A8=E4=BD=BF=E7=94=A8jquery3=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复使用的.context 在jq3中被移除 --- src/controllers/keyboard.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/controllers/keyboard.js b/src/controllers/keyboard.js index d9671c2d..c8ea1e18 100644 --- a/src/controllers/keyboard.js +++ b/src/controllers/keyboard.js @@ -180,13 +180,13 @@ function formulaMoveEvent(dir, ctrlKey, shiftKey, event){ event.preventDefault(); } - else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){ + else if(anchor.is("#luckysheet-rich-text-editor") && anchor.get(0).childElementCount == anchorOffset){ formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); luckysheetMoveHighlightCell("down", -1, "rangeOfSelect"); event.preventDefault(); } - else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){ + else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.get(0).length == anchorOffset){ formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); luckysheetMoveHighlightCell("down", -1, "rangeOfSelect"); @@ -200,13 +200,13 @@ function formulaMoveEvent(dir, ctrlKey, shiftKey, event){ event.preventDefault(); } - else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){ + else if(anchor.is("#luckysheet-rich-text-editor") && anchor.get(0).childElementCount == anchorOffset){ formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); event.preventDefault(); } - else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){ + else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.get(0).length == anchorOffset){ formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); luckysheetMoveHighlightCell("down", 1, "rangeOfSelect"); @@ -243,13 +243,13 @@ function formulaMoveEvent(dir, ctrlKey, shiftKey, event){ event.preventDefault(); } - else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){ + else if(anchor.is("#luckysheet-rich-text-editor") && anchor.get(0).childElementCount == anchorOffset){ formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); luckysheetMoveHighlightCell("right", 1, "rangeOfSelect"); event.preventDefault(); } - else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){ + else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.get(0).length == anchorOffset){ formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); luckysheetMoveHighlightCell("right", 1, "rangeOfSelect");