Skip to content

Commit

Permalink
Fix typing operator in number box at start as well
Browse files Browse the repository at this point in the history
  • Loading branch information
joswarmer committed Oct 17, 2024
1 parent b9687c8 commit b592c8b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ export class TextComponentHelper {
this._endEditing();
editor.selectPreviousLeafIncludingExpressionPreOrPost();
LOGGER.log(htmlId + " PREVIOUS 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.LEFT_MOST, editor)
actionBox.setCaret(FreCaret.LEFT_MOST, editor)
}
}
event.preventDefault();
Expand Down

0 comments on commit b592c8b

Please sign in to comment.