fix(loop): let arrow keys cross a repeating carousel's seam - #350
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
For a carousel without navigation blocks the arrow keys are the only keyboard control, so the last slide was unreachable there.
the arrow keys step a repeating carousel one slide across its seam, fails on the old build withExpected: 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.