mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 13:38:49 +08:00
FIX: Allow links to name
attributes
This commit is contained in:
parent
5667cfe6cb
commit
65297533fa
|
@ -78,6 +78,9 @@ Discourse.URL = Em.Object.createWithMixins({
|
||||||
jumpScheduled = true;
|
jumpScheduled = true;
|
||||||
Em.run.schedule('afterRender', function() {
|
Em.run.schedule('afterRender', function() {
|
||||||
var $elem = $(id);
|
var $elem = $(id);
|
||||||
|
if ($elem.length === 0) {
|
||||||
|
$elem = $("[name=" + id.replace('#', ''));
|
||||||
|
}
|
||||||
if ($elem.length > 0) {
|
if ($elem.length > 0) {
|
||||||
$('html,body').scrollTop($elem.offset().top - $('header').height() - 15);
|
$('html,body').scrollTop($elem.offset().top - $('header').height() - 15);
|
||||||
jumpScheduled = false;
|
jumpScheduled = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user