From c25fe7cecc0cfbaf0f97cea1029f5d4056ea6485 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Wed, 11 Mar 2015 17:41:52 -0700 Subject: [PATCH] Fixing Feed view space bar scrolling bug where story is collapsed. --- media/js/newsblur/reader/reader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/media/js/newsblur/reader/reader.js b/media/js/newsblur/reader/reader.js index f8a96c518..869a30bcd 100644 --- a/media/js/newsblur/reader/reader.js +++ b/media/js/newsblur/reader/reader.js @@ -895,7 +895,7 @@ this.scroll_in_story(scroll_height, direction); - if (!this.active_story) { + if (!this.active_story || !this.active_story.get('selected')) { this.open_next_unread_story_across_feeds(); } else if (_.contains(['split', 'full'], NEWSBLUR.assets.preference('story_layout'))) { if (direction > 0) { @@ -922,7 +922,7 @@ } } else if (_.contains(['list', 'grid'], NEWSBLUR.assets.preference('story_layout'))) { var scroll_top = this.$s.$story_titles.scrollTop(); - var $story = this.$s.$story_titles.find('.NB-story-title.NB-selected').closest('.NB-story-title-container'); + var $story = this.active_story.story_title_view.$el; var story_height = $story.height(); var story_offset = $story.position().top; console.log(['space list', $story[0], scroll_top, story_height, story_offset, story_height+story_offset-scroll_height, page_height]);