FIX: Don't trigger `scrolled` while the router is transitioning.
This commit is contained in:
parent
1022806f6a
commit
3f316b29f0
|
@ -19,8 +19,12 @@ Discourse.Scrolling = Em.Mixin.create({
|
|||
bindScrolling: function(opts) {
|
||||
opts = opts || {debounce: 100};
|
||||
|
||||
// So we can not call the scrolled event while transitioning
|
||||
var router = Discourse.__container__.lookup('router:main').router;
|
||||
|
||||
var self = this,
|
||||
onScrollMethod = function() {
|
||||
if (router.activeTransition) { return; }
|
||||
return Em.run.scheduleOnce('afterRender', self, 'scrolled');
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue