aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default/js/shaarli.js
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/default/js/shaarli.js')
-rw-r--r--tpl/default/js/shaarli.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js
index 30d8ed6f..edcf2809 100644
--- a/tpl/default/js/shaarli.js
+++ b/tpl/default/js/shaarli.js
@@ -255,10 +255,9 @@ window.onload = function () {
255 * Remove CSS target padding (for fixed bar) 255 * Remove CSS target padding (for fixed bar)
256 */ 256 */
257 if (location.hash != '') { 257 if (location.hash != '') {
258 var anchor = document.querySelector(location.hash); 258 var anchor = document.getElementById(location.hash.substr(1));
259 if (anchor != null) { 259 if (anchor != null) {
260 var padsize = anchor.clientHeight; 260 var padsize = anchor.clientHeight;
261 console.log(document.querySelector(location.hash).clientHeight);
262 this.window.scroll(0, this.window.scrollY - padsize); 261 this.window.scroll(0, this.window.scrollY - padsize);
263 anchor.style.paddingTop = 0; 262 anchor.style.paddingTop = 0;
264 } 263 }