mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Fixing infernal scroll bug where scroll events would queue up even though they weren't supposed to.
This commit is contained in:
parent
1b0cb2d36a
commit
e45de166e7
5 changed files with 8 additions and 10 deletions
|
@ -815,27 +815,27 @@
|
|||
}
|
||||
// NEWSBLUR.log(['scroll_in_story', this.$s.$story_pane, direction, amount]);
|
||||
if (NEWSBLUR.assets.preference('story_layout') == 'list') {
|
||||
this.$s.$story_titles.scrollTo({
|
||||
this.$s.$story_titles.stop().scrollTo({
|
||||
top: dir+'='+amount,
|
||||
left:'+=0'
|
||||
}, 130, {queue: false});
|
||||
} else if (this.story_view == 'page' &&
|
||||
!this.flags['page_view_showing_feed_view'] &&
|
||||
!this.flags['temporary_story_view']) {
|
||||
this.$s.$feed_iframe.scrollTo({
|
||||
this.$s.$feed_iframe.stop().scrollTo({
|
||||
top: dir+'='+amount,
|
||||
left:'+=0'
|
||||
}, 130, {queue: false});
|
||||
} else if ((this.story_view == 'feed' &&
|
||||
!this.flags['temporary_story_view']) ||
|
||||
this.flags['page_view_showing_feed_view']) {
|
||||
this.$s.$feed_scroll.scrollTo({
|
||||
this.$s.$feed_scroll.stop().scrollTo({
|
||||
top: dir+'='+amount,
|
||||
left:'+=0'
|
||||
}, 130, {queue: false});
|
||||
} else if (this.story_view == 'text' ||
|
||||
this.flags['temporary_story_view']) {
|
||||
this.$s.$text_view.scrollTo({
|
||||
this.$s.$text_view.stop().scrollTo({
|
||||
top: dir+'='+amount,
|
||||
left:'+=0'
|
||||
}, 130, {queue: false});
|
||||
|
|
|
@ -178,9 +178,8 @@ NEWSBLUR.Views.StoryListView = Backbone.View.extend({
|
|||
|
||||
clearTimeout(NEWSBLUR.reader.locks.scrolling);
|
||||
NEWSBLUR.reader.flags.scrolling_by_selecting_story_title = true;
|
||||
NEWSBLUR.reader.$s.$feed_scroll._scrollable().stop();
|
||||
var scroll_to = options.scroll_to_top ? 0 : $story;
|
||||
NEWSBLUR.reader.$s.$feed_scroll.scrollTo(scroll_to, {
|
||||
NEWSBLUR.reader.$s.$feed_scroll.stop().scrollTo(scroll_to, {
|
||||
duration: options.immediate ? 0 : 340,
|
||||
axis: 'y',
|
||||
easing: 'easeInOutQuint',
|
||||
|
|
|
@ -122,7 +122,7 @@ NEWSBLUR.Views.StoryShareView = Backbone.View.extend({
|
|||
if (_.contains(['split', 'full'], NEWSBLUR.assets.preference('story_layout'))) {
|
||||
$scroll_container = this.model.latest_story_detail_view.$el.parent();
|
||||
}
|
||||
$scroll_container.scrollTo(this.$el, {
|
||||
$scroll_container.stop().scrollTo(this.$el, {
|
||||
duration: 600,
|
||||
queue: false,
|
||||
easing: 'easeInOutQuint',
|
||||
|
|
|
@ -114,7 +114,7 @@ NEWSBLUR.Views.StoryTitlesView = Backbone.View.extend({
|
|||
if (this.pre_load_page_scroll_position > 0) {
|
||||
this.pre_load_page_scroll_position += $endline.outerHeight();
|
||||
}
|
||||
$story_titles.scrollTo($endline, {
|
||||
$story_titles.stop().scrollTo($endline, {
|
||||
duration: 0,
|
||||
axis: 'y',
|
||||
easing: 'easeInOutQuint',
|
||||
|
@ -170,7 +170,7 @@ NEWSBLUR.Views.StoryTitlesView = Backbone.View.extend({
|
|||
if (this.post_load_page_scroll_position == $story_titles.scrollTop() &&
|
||||
this.pre_load_page_scroll_position != null &&
|
||||
!NEWSBLUR.reader.flags['select_story_in_feed']) {
|
||||
$story_titles.scrollTo(this.pre_load_page_scroll_position, {
|
||||
$story_titles.stop().scrollTo(this.pre_load_page_scroll_position, {
|
||||
duration: 0,
|
||||
axis: 'y',
|
||||
offset: 0,
|
||||
|
|
1
media/js/vendor/jquery.scrollTo.js
vendored
1
media/js/vendor/jquery.scrollTo.js
vendored
|
@ -103,7 +103,6 @@
|
|||
duration = duration || settings.duration;
|
||||
// Make sure the settings are given right
|
||||
settings.queue = settings.queue && settings.axis.length > 1;
|
||||
|
||||
if( settings.queue )
|
||||
// Let's keep the overall duration
|
||||
duration /= 2;
|
||||
|
|
Loading…
Add table
Reference in a new issue