|
@@ -3,6 +3,7 @@ import {hasClosestBlock, hasClosestByClassName} from "../../util/hasClosest";
|
|
|
import {openMenuPanel} from "./openMenuPanel";
|
|
|
import {Menu} from "../../../plugin/Menu";
|
|
|
import {updateAttrViewCellAnimation} from "./action";
|
|
|
+import {isCtrl} from "../../util/compatibility";
|
|
|
|
|
|
export const getCalcValue = (column: IAVColumn) => {
|
|
|
if (!column.calc || !column.calc.result) {
|
|
@@ -380,7 +381,8 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type
|
|
|
if (event.isComposing) {
|
|
|
return;
|
|
|
}
|
|
|
- if (event.key === "Escape" || event.key === "Enter") {
|
|
|
+ if (event.key === "Escape" ||
|
|
|
+ (event.key === "Enter" && !event.shiftKey && !isCtrl(event))) {
|
|
|
updateCellValue(protyle, type, cellElements);
|
|
|
event.preventDefault();
|
|
|
event.stopPropagation();
|
|
@@ -400,7 +402,7 @@ const updateCellValue = (protyle: IProtyle, type: TAVCol, cellElements: HTMLElem
|
|
|
const avid = cellElements[0].parentElement.dataset.avid;
|
|
|
cellElements[0] = protyle.wysiwyg.element.querySelector(`[data-av-id="${avid}"] .av__row--add`).previousElementSibling.querySelector('[data-detached="true"]')
|
|
|
}
|
|
|
- if ( cellElements.length === 1 && cellElements[0].dataset.detached === "true" && !cellElements[0].parentElement.dataset.id) {
|
|
|
+ if (cellElements.length === 1 && cellElements[0].dataset.detached === "true" && !cellElements[0].parentElement.dataset.id) {
|
|
|
return;
|
|
|
}
|
|
|
const blockElement = hasClosestBlock(cellElements[0]);
|