mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-23 17:25:14 +02:00
fix: Scrolling up action would leave focusIndexes at incorrect states
This commit is contained in:
@@ -20,14 +20,14 @@
|
||||
if (selectable && get(selectable.focusIndex) === 0) {
|
||||
history.back();
|
||||
} else {
|
||||
selectable?.focusChild(0) || selectable?.focus();
|
||||
selectable?.focusChild(0, { cycleTo: true }) || selectable?.focus({ cycleTo: true });
|
||||
}
|
||||
}
|
||||
|
||||
function handleGoToTop() {
|
||||
const selectable = get(topSelectable);
|
||||
if (topSelectable) {
|
||||
selectable?.focusChild(0) || selectable?.focus();
|
||||
selectable?.focusChild(0, { cycleTo: true }) || selectable?.focus({ cycleTo: true });
|
||||
} else handleGoBack();
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user