Merge pull request #837 from ArthurHoaro/theme/js-edit-linklist-margin

Theme: JS - Fix a bug preventing edit margin suppression to work
This commit is contained in:
ArthurHoaro 2017-03-27 19:23:54 +02:00 committed by GitHub
commit b64d83cd2b

View file

@ -255,10 +255,9 @@ window.onload = function () {
* Remove CSS target padding (for fixed bar)
*/
if (location.hash != '') {
var anchor = document.querySelector(location.hash);
var anchor = document.getElementById(location.hash.substr(1));
if (anchor != null) {
var padsize = anchor.clientHeight;
console.log(document.querySelector(location.hash).clientHeight);
this.window.scroll(0, this.window.scrollY - padsize);
anchor.style.paddingTop = 0;
}