Skip to content

Clicking outside of a carousel image breaks the carousel with the NoWrap option #180

@LoganTann

Description

@LoganTann

The original issue is here Dogfalo#6459 and wasn't fixed by 1.1.0-alpha. No PR were made, but we describe why the issue happens and what code have to be changed : all we need is a volounteer who can fork and create the PR.

Here is an issue with a better English and explanations.

Expected Behavior

  • In a carousel with NoWrap option, we can navigate to right or left by clicking at the correct side of the carousel, as long as we don't click on the carousel image.
  • Clicking :
    • at left when the current selected item is the first should move to the last item
    • at right when the current selected item is the last should move to the first item

Current Behavior

Clicking :

  • at left when the current selected item is the first
  • at right when the current selected item is the last

will break the carousel display (clicking inside a carousel item fixes the display) and also the "navigation by clicking right or left side" feature (to make it work again, we have to reload the page).

Possible Solution

See comments starting from : Dogfalo#6459 (comment)

We've found a both the source and the solution to the issue, but we haven't made a pull request. Thus, this should be easy to fix.

Steps to Reproduce

See the description above, or open the codepen link below and follow the instructions

Context (of original issue)

Carousel are often used in my project to store a short list of book/albums and display their metadata depending on the current selected item.

Your Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions