tiny-slider
tiny-slider copied to clipboard
autoWidth option crashes slider
Issue description:
We have been trying to implement the slider with autoWidth and keep running into this error.
The slider is building the container elements properly, but changing the slide by dragging or clicking on the arrows does nothing.
Without the autoWidth setting it works perfectly.
Perhaps there is a conflict with other plugins on the global scope. But we can not find any console logged errors. It just simply stops working. We even tried the demo settings just to be sure.
Demo link/slider setting:
container: this.find('[data-list=slides]')[0],
nav: false,
gutter: 20,
items:3.3,
autoWidth: true,
loop: false,
mouseDrag: true,
swipeAngle: false,
speed: 400,
prevButton: this.find('[data-click=prev]')[0],
nextButton: this.find('[data-click=next]')[0],
Tiny-slider version: 2.9.1 & 2.9.2 Browser name && version: Chrome Version 75.0.3770.142 (Official Build) (64-bit) actually, on all browser. our development target is ie11 ;) and have been testing on all machines OS name && version: ...
I have the same issue, I believe it's a combination of the autoWidth
property and CSS margins.
As #389 pointed out, the plugin does not initialize (doesn't work, doesn't show any controls) when setting autoWidth: true
and the slider items have a CSS margin.
Here's a demo of the slider working with autoWidth and no margins.
Here's a demo of the slider not working with autoWidth and margins.
Notice that every other combination is possible, the problem only occurs when both autoWidth
and CSS margins are there.
Same (similar) issue here.
We have a project where CSS directive "letter-spacing" breaks the slider if set on the div of the slider-items.
If this is copied to a local html-file and run in Firefox(68.0.1 @ MacOS) or Chrome (75.0.3770.100 @ MacOS), setting letter-spacing will break the slider if autoWidth = true. If set to autoWidth=false, the slider will work.
I'm seeing similar issues, sometimes autoWidth works as expected, sometimes is doesn't. When it doesn't, no errors are logged in the console, the HTML wrappers are added correctly, but the onInit callback is not called. My best guess is that Tiny Slider is having a hard time determining the outer width of the slides, thinks that the total width is less than the parent width and concludes it doesn't need to initialize.
I have other problem with autoWidth, slider crushing when I try use it with lazyLoad option.
@yurysosnov-neklo if you have a different problem, it's usually best to comment on the issue about that problem, or create a new issue if it does not exist yet.
So, is this going to get addressed properly? I'm also incurring with auto-width hiding the controls of my slider
Same Problem here. autoWidth is hiding controls and mouseDrag wont work. Maybe more not working.