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:
commit
b64d83cd2b
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue