Dogfalo / materialize

Materialize, a CSS Framework based on Material Design
https://materializecss.com
MIT License
38.87k stars 4.74k forks source link

Carousel Full Width Slider not showing (chrome) #3929

Open truehlidskjalf opened 7 years ago

truehlidskjalf commented 7 years ago

If you hit the back button on chrome the carousel is not showing, even in your own web.

go to http://materializecss.com/carousel.html ... then go anywhere else, hit back button on chrome.

regards.

acburst commented 7 years ago

Are there any console errors? I can't reproduce this and it seems like something else is probably causing this.

kuzeko commented 7 years ago

I've found problems with the way chrome handles the cache of images (e.g., http://stackoverflow.com/questions/5624733/jquery-load-not-firing-on-images-probably-caching)

You can solve replacing line 42 here with :

$( window ).on('load', function(){ view.css('height', $(firstImage).height()); });

ngooide commented 7 years ago

another may works which work for me is

.carousel.carousel-slider { top: 0; left: 0; height: calc(100vh); }

kuzeko commented 7 years ago

calc and vh support are far from ideal

http://caniuse.com/#search=calc http://caniuse.com/#search=vh

alexisgstalter commented 6 years ago

@kuzeko You made my day with this solution ! I was stuck in my project but I can continu right now, thank you so much ! You did great !