malsup / cycle

jQuery Cycle Plugin - Slideshow goodness
http://jquery.malsup.com/cycle/
1.19k stars 307 forks source link

containerResize does not work when page is zoomed #145

Closed DolphRoger closed 11 years ago

DolphRoger commented 11 years ago

Hello,

when you zoom a website with ctrl+mousewheel and then refresh the page with a cycling element on it, which depends on containerResize, the container is resized to 0 height. I tested this with IE 10 and latest Firefox, probably an issue in Chrome too. I tracked down the problem to line 361:

var reshape = (opts.containerResize || opts.containerResizeHeight) && !$cont.innerHeight();

$cont.innerHeight() is not 0 with a zoomed page, but between 0 and 1. I fixed it changing the line to:

var reshape = (opts.containerResize || opts.containerResizeHeight) && $cont.innerHeight() < 1;

Best, Dolph

malsup commented 11 years ago

Thanks!