mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 20:03:39 +08:00
Merge pull request #3503 from paulkaplan/fix-name-anchoring
Fix missing bracket in name selector in url anchor jumping
This commit is contained in:
commit
3070a60597
|
@ -89,7 +89,7 @@ Discourse.URL = Ember.Object.createWithMixins({
|
|||
Em.run.schedule('afterRender', function() {
|
||||
var $elem = $(id);
|
||||
if ($elem.length === 0) {
|
||||
$elem = $("[name=" + id.replace('#', ''));
|
||||
$elem = $("[name='" + id.replace('#', '') + "']");
|
||||
}
|
||||
if ($elem.length > 0) {
|
||||
$('html,body').scrollTop($elem.offset().top - $('header').height() - 15);
|
||||
|
|
Loading…
Reference in New Issue
Block a user