question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unnecessary scroll under certain conditions

See original GitHub issue

Hi! I ran into a nasty bug with unnecessary scroll under certain conditions:

  • loop: true
  • draggable: false
  • slidesToScroll: more than 1 (for example 4)
  • slides count: more than slidesToScroll but not completely divisible by slidesToScroll (for example 5)

In this case after initial load when we scroll to next and try to click link on the first slide we see unnecessary scroll.

Here’s a demonstration of what I’m talking about: https://codesandbox.io/s/embla-carousel-containscroll-mec6x

As I figured out it is because click on the link fires focus event and Embla considers that this is not the current slide and does scroll.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
olushchikcommented, Jun 6, 2020

Thanks a lot, you are the best!

0reactions
davidjerlekecommented, Jun 22, 2020

Awesome, thank you for your feedback. I’m closing this issue and thanks for reporting this 👍.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unnecessary scroll under certain conditions · Issue #46 - GitHub
Hi! I ran into a nasty bug with unnecessary scroll under certain conditions: loop : true; draggable : false; slidesToScroll : more than...
Read more >
CSS - unnecessary horizontal Scrollbar - Stack Overflow
On my WordPress based website there is a unnecessary horizonzal Scrollbar. How can I get rid of it? I checked the CSS looking...
Read more >
How to Hide the Scrollbar in CSS - HubSpot Blog
Learn how to hide the scrollbar in CSS, plus how to disable scrolling or keep scrolling enabled on your website.
Read more >
Quebec Condition Builder v2 has unnecessary horizontal ...
After upgrading to Quebec, an unnecessary horizontal scrollbar is rendered on the Condition Builder V2. Steps to Reproduce. 1- Open an existing Incident...
Read more >
What is causing Firefox to display UI scrollbars that are not ...
Open DevStudio · Locate the FORM that you use and that exhibits the scrollbar issue in Firefox. · Scroll to the outer left...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found