Skip to content

Commit

Permalink
fix: don't navigate cells when in inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayka committed Dec 19, 2024
1 parent 4d32992 commit 76b9e99
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/src/components/editor/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,17 @@ const CellComponent = (
});

useKeydownOnElement(editing ? cellRef : null, {
ArrowDown: () => {
ArrowDown: (evt) => {
if (evt && Events.fromInput(evt)) {
return false;
}
moveToNextCell({ cellId, before: false, noCreate: true });
return true;
},
ArrowUp: () => {
ArrowUp: (evt) => {
if (evt && Events.fromInput(evt)) {
return false;
}
moveToNextCell({ cellId, before: true, noCreate: true });
return true;
},
Expand Down

0 comments on commit 76b9e99

Please sign in to comment.