aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default/js
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/default/js')
-rw-r--r--tpl/default/js/shaarli.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js
index 1c66ebbd..55656f80 100644
--- a/tpl/default/js/shaarli.js
+++ b/tpl/default/js/shaarli.js
@@ -275,8 +275,14 @@ window.onload = function () {
275 }; 275 };
276 function init () { 276 function init () {
277 function resize () { 277 function resize () {
278 /* Fix jumpy resizing: https://stackoverflow.com/a/18262927/1484919 */
279 var scrollTop = window.pageYOffset ||
280 (document.documentElement || document.body.parentNode || document.body).scrollTop;
281
278 description.style.height = 'auto'; 282 description.style.height = 'auto';
279 description.style.height = description.scrollHeight+10+'px'; 283 description.style.height = description.scrollHeight+10+'px';
284
285 window.scrollTo(0, scrollTop);
280 } 286 }
281 /* 0-timeout to get the already changed text */ 287 /* 0-timeout to get the already changed text */
282 function delayedResize () { 288 function delayedResize () {