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 714420b7..4d47fcd0 100644
--- a/tpl/default/js/shaarli.js
+++ b/tpl/default/js/shaarli.js
@@ -258,10 +258,9 @@ window.onload = function () {
258 * Remove CSS target padding (for fixed bar) 258 * Remove CSS target padding (for fixed bar)
259 */ 259 */
260 if (location.hash != '') { 260 if (location.hash != '') {
261 var anchor = document.querySelector(location.hash); 261 var anchor = document.getElementById(location.hash.substr(1));
262 if (anchor != null) { 262 if (anchor != null) {
263 var padsize = anchor.clientHeight; 263 var padsize = anchor.clientHeight;
264 console.log(document.querySelector(location.hash).clientHeight);
265 this.window.scroll(0, this.window.scrollY - padsize); 264 this.window.scroll(0, this.window.scrollY - padsize);
266 anchor.style.paddingTop = 0; 265 anchor.style.paddingTop = 0;
267 } 266 }