fix(editor): Indent on tabs in expression fields (#9659)

This commit is contained in:
Milorad FIlipović
2024-06-07 15:30:26 +02:00
committed by GitHub
parent ebba7c87cd
commit bb7227d18d
3 changed files with 33 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ import {
import { indentLess, indentMore, insertNewlineAndIndent, redo, undo } from '@codemirror/commands';
import type { EditorView, KeyBinding } from '@codemirror/view';
export const tabKeyMap = (singleLine = false): KeyBinding[] => [
export const tabKeyMap = (blurOnTab = false): KeyBinding[] => [
{
any(view, event) {
if (
@@ -27,7 +27,7 @@ export const tabKeyMap = (singleLine = false): KeyBinding[] => [
return acceptCompletion(view);
}
if (!singleLine) return indentMore(view);
if (!blurOnTab) return indentMore(view);
return false;
},
},