diff --git a/emhttp/plugins/dynamix/include/DefaultPageLayout/BodyInlineJS.php b/emhttp/plugins/dynamix/include/DefaultPageLayout/BodyInlineJS.php index cc980995c..ae5f5eb67 100644 --- a/emhttp/plugins/dynamix/include/DefaultPageLayout/BodyInlineJS.php +++ b/emhttp/plugins/dynamix/include/DefaultPageLayout/BodyInlineJS.php @@ -283,8 +283,10 @@ $(function() { $(this).attr('onsubmit','clearTimeout(timers.flashReport);escapeQuotes(this);'+onsubmit); } }); - var top = ($.cookie('top')||0); - if (top>0) {$('html,body').scrollTop(top);} + const top = parseInt($.cookie('top') || '0', 10); + if (top > 0) { + $('html, body').scrollTop(top); + } $.removeCookie('top'); if ($.cookie('addAlert') != null) bannerAlert(addAlert.text,addAlert.cmd,addAlert.plg,addAlert.func);