From daa5b1f77d595491217c4ef831d314288c3f5f4b Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 5 Jun 2014 09:55:45 +1000 Subject: [PATCH] BUGFIX: Ember.run.throttle is dodge. --- app/assets/javascripts/discourse/lib/Markdown.Editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/Markdown.Editor.js b/app/assets/javascripts/discourse/lib/Markdown.Editor.js index da26e8e77f9..00bfa18f77c 100644 --- a/app/assets/javascripts/discourse/lib/Markdown.Editor.js +++ b/app/assets/javascripts/discourse/lib/Markdown.Editor.js @@ -891,8 +891,9 @@ }; var setupScrollSync = function() { + var sync = _.throttle(syncScroll, 20); $(panels.input).scroll(function() { - Ember.run.throttle(null, syncScroll, 16); + sync(); }); }; @@ -987,7 +988,6 @@ currentWait = wait; } - //console.log(currentWait); if (timeout) { clearTimeout(timeout); } timeout = setTimeout(later, currentWait); }