From 3e5420da35e184f867ba95035918b80e6dfc5ad3 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 5 Mar 2015 15:09:31 +1100 Subject: [PATCH] correct comments --- app/assets/javascripts/discourse/lib/url.js | 3 ++- vendor/assets/javascripts/lock-on.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/url.js b/app/assets/javascripts/discourse/lib/url.js index fcbc2a5d5..7c58c1be8 100644 --- a/app/assets/javascripts/discourse/lib/url.js +++ b/app/assets/javascripts/discourse/lib/url.js @@ -38,7 +38,8 @@ Discourse.URL = Ember.Object.createWithMixins({ var holder = $(holderId); if(holder.length > 0 && opts && opts.skipIfOnScreen){ - // if we are on screen just scroll to post + + // if we are on screen skip var elementTop = lockon.elementTop(), scrollTop = $(window).scrollTop(), windowHeight = $(window).height()-offset(), diff --git a/vendor/assets/javascripts/lock-on.js b/vendor/assets/javascripts/lock-on.js index c7c1ec1cb..8ef8e7a17 100644 --- a/vendor/assets/javascripts/lock-on.js +++ b/vendor/assets/javascripts/lock-on.js @@ -1,7 +1,7 @@ // Dear traveller, you are entering a zone where we are at war with the browser // the browser is insisting on positioning scrollTop per the location it was in // the past, we are insisting on it being where we want it to be -// The hack is just to keep trying over and over to positiong the scrollbar (up to 1 minute) +// The hack is just to keep trying over and over to position the scrollbar (up to 1 minute) // // The root cause is that a "refresh" on a topic page will almost never be at the // same position it was in the past, the URL points to the post at the top of the