Browse Source

Fix unicode anchor links.

Fix #3119
pull/3136/head
maliming 7 years ago
parent
commit
96a31fe355
  1. 4
      modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Scripts/vs.js

4
modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Scripts/vs.js

@ -47,7 +47,7 @@
return;
}
var $targetElement = $(hash);
var $targetElement = $(decodeURIComponent(hash));
$targetElement = $targetElement.length ? $targetElement : $('[name=' + this.hash.slice(1) + ']');
@ -77,7 +77,7 @@
event.preventDefault();
var hash = this.hash;
$('html, body').animate({
scrollTop: $(hash).offset().top
scrollTop: $(decodeURIComponent(hash)).offset().top
}, 500, function () {
window.location.hash = hash;
});

Loading…
Cancel
Save