fix: tighten stack selection keyboard handling
This commit is contained in:
@@ -114,7 +114,7 @@ function moveStackSelection(direction) {
|
||||
if (!hasStackSelection()) {
|
||||
if (direction === 'up') {
|
||||
ensureValidSelection();
|
||||
} else {
|
||||
} else if (direction === 'down') {
|
||||
reactivateEditOnX();
|
||||
}
|
||||
return;
|
||||
@@ -123,11 +123,6 @@ function moveStackSelection(direction) {
|
||||
const nextIndex = direction === 'up' ? stackCursor + 1 : stackCursor - 1;
|
||||
if (calc.isValidIndex(nextIndex)) {
|
||||
stackCursor = nextIndex;
|
||||
return;
|
||||
}
|
||||
|
||||
if (direction === 'down' && stackCursor === 0) {
|
||||
reactivateEditOnX();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,6 +347,13 @@ function handleKeydown(event) {
|
||||
if (isMovingStackItem) {
|
||||
event.preventDefault();
|
||||
cancelMoveMode();
|
||||
clearStackSelection();
|
||||
render();
|
||||
return;
|
||||
}
|
||||
if (hasStackSelection()) {
|
||||
event.preventDefault();
|
||||
clearStackSelection();
|
||||
render();
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user