mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: Don't trigger scrolled
while the router is transitioning.
This commit is contained in:
parent
1022806f6a
commit
3f316b29f0
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue