Closed facboy closed 8 years ago
I managed to get a demo working on plunkr: http://plnkr.co/edit/bFEUseCv5G1SefhCrbL9
When it is set to use strategy: "scroll" it constantly logs "Scroll: " "Poll. Style not resolved." in the console. It works when using object.
Hmm interesting. It seems to work if you change the #resize
to display: block
.
I'll investigate why this is later today.
The problem I was actually trying to debug is to do with the listener never being fired when using scroll strategy, I'm not sure whether it's something to do with me having the element itself be inside a scroll container. While trying to debug this on Plunker I did find that the hidden sensor div is interfering with the page layout:
http://plnkr.co/oRPXltoG5kP7iBTgWSov
Notice how a scrollbar appears even though there is no content.
Compare this with marcj's ResizeSensor:
http://plnkr.co/4Pm8OTXKAfZyvonOoVTd
No scrollbar is present.
Interesting. Your linked example seems to work fine on my computer. Which OS and browser are you using? Could you upload an image or a video that shows the leaked scrollbars?
This is how it looks for me. https://v.usetapes.com/SmanSPDMtY
Ubuntu 14.04.3, Chrome 47.0.2526.73.
Okay thanks. I've created a separate issue to handle the scroll polling issue with inline elements (such as span). I'll investigate the visible scrollbars as soon as my virtual installation of Ubuntu is finished.
This should now have been fixed in the 1.1.0 release
I might be doing something really stupid here, but I cannot get this to work at all in JSFiddle. I'm actually trying to reproduce another problem I'm having with our prod site so I can submit an issue for that, but I can't get this library to work at all on JSFiddle.