FIX: Adds sheet "block" navigation
This was a left over from the old days Control+right arrow takes you to the next cell with text or the end of the block NB: Missing tests
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
1eea2a8c46
commit
46b1ade34a
@@ -249,8 +249,8 @@ const Workbook = (props: { model: Model; workbookState: WorkbookState }) => {
|
||||
onToggleUnderline(!value);
|
||||
},
|
||||
onNavigationToEdge: (direction: NavigationKey): void => {
|
||||
console.log(direction);
|
||||
throw new Error("Function not implemented.");
|
||||
model.onNavigateToEdgeInDirection(direction);
|
||||
setRedrawId((id) => id + 1);
|
||||
},
|
||||
onPageDown: (): void => {
|
||||
model.onPageDown();
|
||||
|
||||
@@ -74,7 +74,11 @@ const useKeyboardNavigation = (
|
||||
if (event.metaKey || event.ctrlKey) {
|
||||
switch (key) {
|
||||
case "z": {
|
||||
options.onUndo();
|
||||
if (event.shiftKey) {
|
||||
options.onRedo();
|
||||
} else {
|
||||
options.onUndo();
|
||||
}
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user