Problem
On WebKit, when the mouse remains over the rows' contents as it scrolls, momentum is broken. Also, the scroll-bar is being rendered behind the list's content. Here's a fiddle which illustrates this behaviour:
As you can see, scrolling momentum is broken since the rows' contents extend their full width (.row-wrapper
); and since the rows extend the full width of the container, the scroll-bar is being rendered behind the content (I made them semi-transparent so you can see the scroll-bar behind them).
When the rows' contents don't extend the full width of the row, scrolling momentum remains normal as long as your mouse remains over an empty area of the row, as illustrated in this next fiddle (try scrolling on the gray area, then on the blue area, and compare momentum):
Solution
I've implemented a temporary solution on my app:
- Applying
z-index: 1;
to .ember-list-view
fixes the scroll-bar layering issue.
- Momentarily applying
position: relative;
to .ember-list-scrolling-view
while scrolling fixes the momentum problem, since it will be momentarily positioned on top of the rows, blocking mouse events on them.
Here are the same 2 fiddles, with the solutions applied (notice the scrollYChanged
hook, and the _scrollingDidStart
and _scrollingDidEnd
methods under App.ListView
, as well as the z-index: 1;
on .ember-list-view
in the CSS file:
Any suggestions on the most appropriate place to patch list-view.js directly to solve these problems? I'd be happy to patch and submit a pull request if you point me in the right direction.