diff --git a/app/assets/javascripts/discourse/lib/url.js b/app/assets/javascripts/discourse/lib/url.js index a22caaaca1d..0ee18f7b0bf 100644 --- a/app/assets/javascripts/discourse/lib/url.js +++ b/app/assets/javascripts/discourse/lib/url.js @@ -78,6 +78,9 @@ Discourse.URL = Em.Object.createWithMixins({ jumpScheduled = true; Em.run.schedule('afterRender', function() { var $elem = $(id); + if ($elem.length === 0) { + $elem = $("[name=" + id.replace('#', '')); + } if ($elem.length > 0) { $('html,body').scrollTop($elem.offset().top - $('header').height() - 15); jumpScheduled = false;