Skip to content

Commit

Permalink
Fix typing operator in number box
Browse files Browse the repository at this point in the history
  • Loading branch information
joswarmer committed Oct 17, 2024
1 parent fcb88b5 commit b9687c8
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import {
ActionBox,
BACKSPACE,
BehaviorExecutionResult,
FreCaret,
FreEditor,
FreErrorSeverity,
FreLogger,
isActionBox,
TextBox,
isActionBox, isActionTextBox,
TextBox
} from "@freon4dsl/core";
import {EventDispatcher} from "svelte";
import {executeCustomKeyboardShortCut} from "./CommonFunctions.js";
Expand Down Expand Up @@ -121,13 +122,15 @@ export class TextComponentHelper {
}

handleGoToNext(event: KeyboardEvent, editor: FreEditor, htmlId: string) {
LOGGER.log("handleGoToNext event " + event.key)
this._endEditing();
editor.selectNextLeafIncludingExpressionPreOrPost();
LOGGER.log(htmlId + " NEXT LEAF IS " + editor.selectedBox.role);
if (isActionBox(editor.selectedBox)) {
const executionResult: BehaviorExecutionResult = editor.selectedBox.tryToExecute(event.key, editor)
if (isActionTextBox(editor.selectedBox)) {
const actionBox = (editor.selectedBox as TextBox).parent as ActionBox
const executionResult: BehaviorExecutionResult = actionBox.tryToExecute(event.key, editor)
if (executionResult !== BehaviorExecutionResult.EXECUTED) {
editor.selectedBox.setCaret(FreCaret.RIGHT_MOST, editor)
actionBox.setCaret(FreCaret.RIGHT_MOST, editor)
}
}
event.preventDefault();
Expand Down

0 comments on commit b9687c8

Please sign in to comment.