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

fix: 修复代码在使用jquery3报错的问题 #1411

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
12 changes: 6 additions & 6 deletions src/controllers/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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");

Expand Down Expand Up @@ -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");

Expand Down