iNoBounce breaks horizontal scrolling
See original GitHub issueHi, I have a DIV purposely set to scroll horizontally however with iNoBounce it breaks this feature.
You can see the CSS and HTML here.
<div class="scrolls">
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
<img src="http://placehold.it/50x50" />
</div>
.scrolls {
overflow-x: scroll;
overflow-y: hidden;
height: 80px;
white-space:nowrap
}
.imageDiv img {
box-shadow: 1px 1px 10px #999;
margin: 2px;
max-height: 50px;
cursor: pointer;
display:inline-block;
*display:inline;/* For IE7*/
*zoom:1;/* For IE7*/
vertical-align:top;
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Div scrolling freezes sometimes if I use -webkit-overflow ...
For me, the freezing was repeatable and happened when trying to scroll up or down when already at the top or bottom, respectively....
Read more >iNoBounce - Bountysource
Hi, I have a DIV purposely set to scroll horizontally however with iNoBounce it breaks this feature. You can see the CSS and...
Read more >inobounce - npm
Sometimes, your scrollable element doesn't scroll at all, but the window still insists on bouncing around. The solution. No dependencies, no ...
Read more >How To Create Horizontal Scrolling Containers - codeburst
Let's first create our container and our children divs inside of it that will scroll horizontally. The HTML is pretty simple. <div class="scrolling-wrapper">...
Read more >-webkit-overflow-scrolling - CSS: Cascading Style Sheets | MDN
The -webkit-overflow-scrolling CSS property controls whether or not touch devices use momentum-based scrolling for a given element.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I refactored and improved the approach a little by moving most of the pre-selection logic into the touchstart listener to greatly simplify the touchmove handler and further optimize performance . All that is needed for reliable results should be these two document-level event handlers (set {passive: false} in supported environments!)
Tested on iOS 11.3 Safari & Chrome Expected Behavior: all iNobounce features + unrestricted horizontal scrolling + no css requirements + performance improvements
This is so trivial that I feel like I’m missing something. Would be interested in more tests and suggestions for futher improvement!
@himynameisubik hmm, let me know if you can hack any of the code to make it work the way it’s expected! PRs welcome.