aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-03-27 19:23:54 +0200
committerGitHub <noreply@github.com>2017-03-27 19:23:54 +0200
commitb64d83cd2b60b6851741787f8ce2ae2c93092841 (patch)
treec5d21721e24a6a020310d3f538863ca71c09cc8b
parentb320c860f5c794c57c08ee2a65c9b73768aac23c (diff)
parent0040058da671bdb103dbd4c402290f5f8f51080b (diff)
downloadShaarli-b64d83cd2b60b6851741787f8ce2ae2c93092841.tar.gz
Shaarli-b64d83cd2b60b6851741787f8ce2ae2c93092841.tar.zst
Shaarli-b64d83cd2b60b6851741787f8ce2ae2c93092841.zip
Merge pull request #837 from ArthurHoaro/theme/js-edit-linklist-margin
Theme: JS - Fix a bug preventing edit margin suppression to work
-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 }