loryjs / loryjs/lory

Next/Prev "buttons" don't work if above the slider element in the DOM

Open
#773 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.3k
Forks
232
PR merge metrics
No merged PRs in 30d

Description

First, love Lory!

Second, as for the issue I'm seeing is: the design I'm working with demands for the "prev/next" buttons to be above the carousel/slider, so I tried a few various things:

Not that it matters, but for the examples, I'm using Vue.js for this project...

a) I saved `lory(el, options)` to my component's local data and then on the custom buttons I created, set the @click callback to `slider.next()/prev()`... Nothing happened. Okay.
b) I added the 'js_prev/next prev/next' classes to my custom button elements... Nothing happened. Okay.
c) I removed my custom buttons and replaced them with the prerequisite HTML spans (which are not accessible, btw) and still, nothing happened.

So, I then put the prerequisite HTML spans back underneath the slider and BOOM, it works!

I got a bit curious and did the exact same steps above but I placed my custom buttons BELOW the slider, and what do you know, it works!

-----------------------------

TL;DR;

I don't believe the carousel works when the control buttons are above/below the carousel, which is odd if I'm using the public API, yet, that's what's happening.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with the prev/next controls placed above the slider, testing both the public API calls and the documented control classes. Compare that behavior with controls placed below the slider; done means both placements work consistently, including the prerequisite controls and custom buttons.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.