FIX: Shift+Letter starts editing cell
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
aa4ecb2c89
commit
81e96f1401
@@ -178,7 +178,6 @@ const useKeyboardNavigation = (
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (isAlt && !isCtrl && !isShift) {
|
if (isAlt && !isCtrl && !isShift) {
|
||||||
// Alt+...
|
// Alt+...
|
||||||
@@ -200,20 +199,24 @@ const useKeyboardNavigation = (
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// At this point we know that no modifier keys are pressed
|
if (isCtrl || isAlt) {
|
||||||
if (isCtrl || isShift || isAlt) {
|
// Other combinations with Ctrl or Alt are not handled
|
||||||
// If any modifier key is pressed, we do not handle the key
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (key === "F2") {
|
|
||||||
options.onCellEditStart();
|
if (isEditingKey(key) || key === "Backspace") {
|
||||||
|
const initText = key === "Backspace" ? "" : key;
|
||||||
|
options.onEditKeyPressStart(initText);
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isEditingKey(key) || key === "Backspace") {
|
if (isShift) {
|
||||||
const initText = key === "Backspace" ? "" : key;
|
// Other combinations with Shift are not handled
|
||||||
options.onEditKeyPressStart(initText);
|
return;
|
||||||
|
}
|
||||||
|
if (key === "F2") {
|
||||||
|
options.onCellEditStart();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user