Skip to content

Commit

Permalink
fix: keyboard controls not respecting view
Browse files Browse the repository at this point in the history
  • Loading branch information
Im-Beast committed Nov 6, 2022
1 parent 756f108 commit 06a31c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function handleKeyboardControls(tui: Tui): void {
if (!(keyPress.ctrl || (pressedKeys.length === 1 && pressedKeys[0] === "return"))) return;

lastSelectedComponent = tui.components.find(
({ state }) => state === "focused",
({ state, view }) => state !== "base" && view === currentView,
) ?? getComponentClosestToTopLeftCorner(tui, true);

const moveVector = { x: 0, y: 0 };
Expand Down

0 comments on commit 06a31c1

Please sign in to comment.