From fb81eb0c7fe81bb063c07e4d6d41399aaf1b8976 Mon Sep 17 00:00:00 2001 From: caedmon Date: Mon, 14 Jan 2019 09:41:22 -0800 Subject: [PATCH] Fix scrolling when clicking thumbnail. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use position rather than offset to get top of monitor, since we want it relative to the canvas. Also, don’t subtract header height since it’s not in the canvas. --- web/libs/js/dash2.elements.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/libs/js/dash2.elements.js b/web/libs/js/dash2.elements.js index 272b58c7..50a0c587 100644 --- a/web/libs/js/dash2.elements.js +++ b/web/libs/js/dash2.elements.js @@ -639,7 +639,7 @@ $(document).ready(function(e){ if($("#monitor_live_"+e.mid+user.auth_token).length===0||$.ccio.mon[e.ke+e.mid+user.auth_token].watch!==1){ $.ccio.cx({f:'monitor',ff:'watch_on',id:e.mid},user) }else{ - $("#main_canvas").animate({scrollTop:$("#monitor_live_"+e.mid+user.auth_token).offset().top-($('#main_header').height()+10)},500); + $("#main_canvas").animate({scrollTop:$("#monitor_live_"+e.mid+user.auth_token).position().top},500); } break; case'watch_off':