Skip to content

fix(loop): let arrow keys cross a repeating carousel's seam - #350

Merged
nk-o merged 1 commit into
masterfrom
claude/keen-swirles-68b7b6
Sep 27, 2026
Merged

nk-o merged 1 commit into
masterfrom
claude/keen-swirles-68b7b6

Conversation

@nk-o

@nk-o nk-o commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

A Gallery Loop carousel with Repeat on could not be stepped past its seam with the arrow keys. The keys were left to the browser's own scroll of the focused list, and that scroll stays inside the range Blossom keeps the loop in, so it never reaches the seam. The arrows on a repeating list now step through slide(), the same path the Previous and Next buttons take.

With 6 slides in 4 columns, pressing ArrowRight from slide 4:

Browser Before After
Chromium stuck on 4, or 4 → 0 depending on the gap 4 → 5 → 0
WebKit 4 → 3 4 → 5 → 0

For a carousel without navigation blocks the arrow keys are the only keyboard control, so the last slide was unreachable there.

  • Only repeating carousels get the handler. A plain carousel keeps the browser's scroll.
  • Alt, Ctrl and Cmd combinations pass through to the browser, since Cmd+← and Alt+← are Back.
  • A new e2e test, the arrow keys step a repeating carousel one slide across its seam, fails on the old build with Expected: 5, Received: 0.

Not checked in Firefox: headless Firefox does not start on the machine this was tested on. Unrelated and still open: in WebKit a repeating carousel opens on its last slide instead of the first.

The browser's arrow-key scroll stays inside the range Blossom keeps
the loop in, so it never reaches the seam: Chromium stuck on or
skipped the last slide, WebKit stepped back. The arrows now step
through slide(), as the Previous and Next buttons do.
@nk-o
nk-o merged commit 5e54788 into master Sep 27, 2026
7 checks passed
@nk-o
nk-o deleted the claude/keen-swirles-68b7b6 branch September 27, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant