mirror of
https://github.com/dream-num/univer.git
synced 2026-09-24 15:32:18 +08:00
fix: fix shortcut ctrl+enter (#5030)
This commit is contained in:
@@ -558,7 +558,7 @@ export class EditingRenderController extends Disposable {
|
||||
: false;
|
||||
|
||||
if (snapshot && !(isEmpty && isCellImage)) {
|
||||
const res = await this._submitEdit(snapshot, keycode === (MetaKeys.CTRL_COMMAND | KeyCode.ENTER));
|
||||
const res = await this._submitEdit(snapshot, keycode === (MetaKeys.CTRL_COMMAND | KeyCode.ENTER) || keycode === (MetaKeys.MAC_CTRL | KeyCode.ENTER));
|
||||
if (res === false) return; // if the submit was rejected, don't move selection
|
||||
}
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@ export const EditorCursorEscShortcut: IShortcutItem = {
|
||||
export const EditorCursorCtrlEnterShortcut: IShortcutItem = {
|
||||
id: SetCellEditVisibleOperation.id,
|
||||
binding: KeyCode.ENTER | MetaKeys.CTRL_COMMAND,
|
||||
mac: KeyCode.ENTER | MetaKeys.MAC_CTRL,
|
||||
preconditions: (contextService) => whenEditorDidNotInputFormulaActivated(contextService),
|
||||
staticParameters: {
|
||||
visible: false,
|
||||
|
||||
Reference in New Issue
Block a user