@fileverse-dev/fortune-core 1.2.87 → 1.2.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/events/keyboard.js
CHANGED
|
@@ -423,12 +423,12 @@ export function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUnd
|
|
|
423
423
|
isFxInput = (_b = (_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.contains("fortune-fx-input");
|
|
424
424
|
ignoredKeys = new Set(isFxInput ? ["Enter", "Tab", "ArrowLeft", "ArrowRight"] : ["Enter", "Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]);
|
|
425
425
|
restCod = !ignoredKeys.has(kstr);
|
|
426
|
-
if (ctx.luckysheetCellUpdate.length > 0 && restCod) {
|
|
426
|
+
if (ctx.luckysheetCellUpdate.length > 0 && restCod && (window.CompositData === "" || window.CompositData === undefined)) {
|
|
427
427
|
return [2];
|
|
428
428
|
}
|
|
429
429
|
if (kstr === "Enter") {
|
|
430
430
|
if (!allowEdit) return [2];
|
|
431
|
-
handleGlobalEnter(ctx, cellInput, e, canvas);
|
|
431
|
+
if (window.CompositData === "" || window.CompositData === undefined) handleGlobalEnter(ctx, cellInput, e, canvas);
|
|
432
432
|
} else if (kstr === "Tab") {
|
|
433
433
|
if (ctx.luckysheetCellUpdate.length > 0) {
|
|
434
434
|
updateCell(ctx, ctx.luckysheetCellUpdate[0], ctx.luckysheetCellUpdate[1], cellInput, undefined, canvas);
|
|
@@ -466,6 +466,7 @@ export function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUnd
|
|
|
466
466
|
} else if (kstr === "Escape") {
|
|
467
467
|
ctx.contextMenu = {};
|
|
468
468
|
} else if (kstr === "Delete" || kstr === "Backspace") {
|
|
469
|
+
console.log("Delete");
|
|
469
470
|
if (!allowEdit) return [2];
|
|
470
471
|
if (ctx.activeImg != null) {
|
|
471
472
|
removeActiveImage(ctx);
|
package/es/modules/formula.js
CHANGED
|
@@ -1597,6 +1597,7 @@ export function handleFormulaInput(ctx, $copyTo, $editor, kcode, preText, refres
|
|
|
1597
1597
|
if (refreshRangeSelect === void 0) {
|
|
1598
1598
|
refreshRangeSelect = true;
|
|
1599
1599
|
}
|
|
1600
|
+
if (!$editor) return;
|
|
1600
1601
|
try {
|
|
1601
1602
|
var value1 = void 0;
|
|
1602
1603
|
var value1txt = preText !== null && preText !== void 0 ? preText : $editor.innerText;
|
package/lib/events/keyboard.js
CHANGED
|
@@ -433,12 +433,12 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
|
|
|
433
433
|
isFxInput = (_b = (_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.contains("fortune-fx-input");
|
|
434
434
|
ignoredKeys = new Set(isFxInput ? ["Enter", "Tab", "ArrowLeft", "ArrowRight"] : ["Enter", "Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]);
|
|
435
435
|
restCod = !ignoredKeys.has(kstr);
|
|
436
|
-
if (ctx.luckysheetCellUpdate.length > 0 && restCod) {
|
|
436
|
+
if (ctx.luckysheetCellUpdate.length > 0 && restCod && (window.CompositData === "" || window.CompositData === undefined)) {
|
|
437
437
|
return [2];
|
|
438
438
|
}
|
|
439
439
|
if (kstr === "Enter") {
|
|
440
440
|
if (!allowEdit) return [2];
|
|
441
|
-
handleGlobalEnter(ctx, cellInput, e, canvas);
|
|
441
|
+
if (window.CompositData === "" || window.CompositData === undefined) handleGlobalEnter(ctx, cellInput, e, canvas);
|
|
442
442
|
} else if (kstr === "Tab") {
|
|
443
443
|
if (ctx.luckysheetCellUpdate.length > 0) {
|
|
444
444
|
(0, _cell.updateCell)(ctx, ctx.luckysheetCellUpdate[0], ctx.luckysheetCellUpdate[1], cellInput, undefined, canvas);
|
|
@@ -476,6 +476,7 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
|
|
|
476
476
|
} else if (kstr === "Escape") {
|
|
477
477
|
ctx.contextMenu = {};
|
|
478
478
|
} else if (kstr === "Delete" || kstr === "Backspace") {
|
|
479
|
+
console.log("Delete");
|
|
479
480
|
if (!allowEdit) return [2];
|
|
480
481
|
if (ctx.activeImg != null) {
|
|
481
482
|
(0, _2.removeActiveImage)(ctx);
|
package/lib/modules/formula.js
CHANGED
|
@@ -1627,6 +1627,7 @@ function handleFormulaInput(ctx, $copyTo, $editor, kcode, preText, refreshRangeS
|
|
|
1627
1627
|
if (refreshRangeSelect === void 0) {
|
|
1628
1628
|
refreshRangeSelect = true;
|
|
1629
1629
|
}
|
|
1630
|
+
if (!$editor) return;
|
|
1630
1631
|
try {
|
|
1631
1632
|
var value1 = void 0;
|
|
1632
1633
|
var value1txt = preText !== null && preText !== void 0 ? preText : $editor.innerText;
|