React-slick: Resizing browser windows breaks the slider

Created on 16 Jun 2017  路  9Comments  路  Source: akiran/react-slick

  1. Go to https://jsfiddle.net/kirana/20bumb4g/
  2. Resize the width of the window
  3. The container grows in height and the slider doesn't work anymore.

Most helpful comment

The bug with resizing occurs not only in jsFiddle. Every resizing breaks the slider layout. The width of the slide is set to something like maxInt: width: 3.35544e+07px;
UPD: It happens at least in latest versions of Chrome.

All 9 comments

anecdotally this does not/has not occurred in production.

So it's a jsfiddle thing?

It looks that way, I have the component configured to pretty much match some of the example demos, the images remain full size within their container and the arrow buttons still work regardless of screen size. I'm not utilizing the responsive prop but the arrows are custom buttons.

I have same problem, when resizing the browser, option autoplay is stop

Ah interesting. I'm not using autoplay as a prop

Man would I love if everyone used labels so that we can actually and easily see a real bug list vs 'unlabeled' tickets that we have to sift through.

The bug with resizing occurs not only in jsFiddle. Every resizing breaks the slider layout. The width of the slide is set to something like maxInt: width: 3.35544e+07px;
UPD: It happens at least in latest versions of Chrome.

I have the slider wrapped in a container, gave the slide imgs a max height and set the width in ems. It preserves the functionality of the arrows and does not distort the images >600px screen size. Admittedly I just switched to react-images though, only because it has a nice pop-out full screen modal feature built in, which handles many of the img scaling issues nicely and better suits the projects needs. https://jossmac.github.io/react-images/#images

Issues with autoplay on resize are fixed with #651

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jfamousket picture jfamousket  路  3Comments

vugman picture vugman  路  3Comments

BradyEdgar94 picture BradyEdgar94  路  3Comments

laveesingh picture laveesingh  路  3Comments

quarklemotion picture quarklemotion  路  4Comments