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.

Breakpoints apply to all sliders, not just the one specified

See original GitHub issue

the breakpoint rules are applied to all sliders on the page, not just the one it’s a part of. e.g. glide1 should show 3 on desktop and 1 on mobile whilst glide2 should show 6 on desktop and 2 on mobile. However, on mobile they both show 2.

new Glide('#glide1', {
	type: 'carousel',
	perView: 3,
	breakpoints: {
		800: {
			perView: 1
		}
	}
}).mount();
new Glide('#glide2', {
	type: 'carousel',
	perView: 6,
	breakpoints: {
		800: {
			perView: 2
		}
	}
}).mount();

PS - I’m using Glide 3.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jedrzejchalubekcommented, Apr 24, 2018

Should be fixed with v3.0.2 release

0reactions
jedrzejchalubekcommented, Apr 30, 2018

@mattisherwood Thanks for detailed bug reports 👍. Addressed this issues with v3.0.3 release.

Ah thanks, the bug is fixed if I use glide.js (v3.0.2) on my dev site. The minified version breaks the sliders though with an Uncaught TypeError: “this.root.querySelector is not a function” at “Object.mount”. I’m aware that possibly could be an install issue though. Do your minified versions work ok?

Minified file for v3.0.3 should be working now. The configuration of the uglify in lib build script was striping too much and breaking.

ie’s debugger says “SCRIPT438: Object doesn’t support property or method ‘from’” and points to:

I’ve swapped Array.from to Array.prototype.slice.call so, now, glidejs should be compatible with IE11. Please, let me know if you test it out 😃

PS. I’m closing this issue for now. If you find any other problems feel free to open new topic 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breakpoint-specific options lost if same as defaults - Drupal
Options made on a per-breakpoint basis can be lost if they are different from the main settings but the same as defaults.
Read more >
Breakpoints - Smart Slider Documentation - Help Scout
Breakpoints are the pixel values where Smart Slider changes to show a different layout. For example, you can use breakpoints to make the ......
Read more >
the breakpoints in slider splide js do not work - Stack Overflow
I'm trying to assign specific options depending on the installed slides count, getting it like this - custom_slider.length . It's all good, it ......
Read more >
Style across breakpoints | Webflow University
Setting styles on one breakpoint, like Desktop, can affect values on other breakpoints. These style values cascade down through different breakpoints ...
Read more >
How to apply view specific properties in responsive projects
For example, you can create objects A, B, and C in Primary breakpoint view. But, you would not want to use B in...
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