Hill30 / NGScroller

Bidirectional infinite scrolling with dynamic data load
MIT License
69 stars 20 forks source link

Problem scrolling up with multiple items per row #93

Open SaintFlipper opened 9 years ago

SaintFlipper commented 9 years ago

Hi, this is the secondary issue raised as a side-effect in #89 ("No way to limit the data source top"). I've opened a new issue as it's really a different artifact and not related to negative indices.

If NGScroller is used to handling scrolling of multiple items per line its behaviour is confused when the user tries to scroll upwards:

  1. Trying to scroll upwards using the mouse wheel causes the scroll window to go down rather than up, ie. higher numbered items are displayed rather than lower items.
  2. Grabbing the scroll bar and dragging it to the top position usually results in out-of-order items and/or duplicate items. In this instance the scrollable items are DIVs with style display:block and float:left. There may be some small variation in behaviour between different browsers, but Chrome 43 on Windows seems fairly representative.

Standalone example at: http://jsfiddle.net/mn59dvjn/5/ Note: make the jsFiddle result pane wide enough to display at least 4 images per row to see the above effects.

mfeingold commented 9 years ago

yea, looks like a bug. it similar to the problem with the inline elements. We have a problem with the setup when elements can jump rows as the width changes. I will mark it as a bug and we will try to fix it, in the meantime a possible solution would be to place everything going into a single row in a separate div.

On the side note we moved the code to angular-ui. All further development will be done in the angular-ui repo

dhilt commented 9 years ago

An issue was created in angular-ui repo: https://github.com/angular-ui/ui-scroll/issues/8.

mfeingold commented 9 years ago

@SaintFlipper I am not sure if this notification made it to you. I think we have a fix for the problem you reported here, but this fix is in the new repo. In general going forward all new development, including fixes will be in the new repo