diff options
Diffstat (limited to 'js/public/app.js')
-rw-r--r-- | js/public/app.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/js/public/app.js b/js/public/app.js index 39cd509c4..33c54c0e5 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -225,21 +225,22 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. } }; jumpToNextItem = function(scrollArea) { - var $item, $items, $scrollArea, item, _i, _len, _results; + var $item, $items, $scrollArea, item, jumped, _i, _len; $scrollArea = $(scrollArea); $items = $scrollArea.find('.feed_item'); - _results = []; + jumped = false; for (_i = 0, _len = $items.length; _i < _len; _i++) { item = $items[_i]; $item = $(item); if ($item.position().top > 1) { + jumped = true; jumpTo($scrollArea, $item); break; - } else { - _results.push(void 0); } } - return _results; + if (jumped === false) { + return $scrollArea.scrollTop($scrollArea.prop('scrollHeight')); + } }; getCurrentItem = function(scrollArea) { var $item, $items, $scrollArea, item, _i, _len; |