FIX: Don't trigger scrolled while the router is transitioning.

This commit is contained in:
Robin Ward 2014-08-08 17:38:10 -04:00
parent 1022806f6a
commit 3f316b29f0

View file

@ -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');
};