tests / bugfix: Timeslider Chrome 55 Further scroll fix (#4186)

pull/4187/head
John McLear 2020-07-20 14:14:02 +01:00 committed by GitHub
parent 3d89eed31a
commit 1e5680a870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -596,12 +596,11 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
var line = $('#innerdocbody').find("div:nth-child("+(lineNumber+1)+")");
var newY = $(line)[0].offsetTop;
var ecb = document.getElementById('editorcontainerbox');
// Cjrome 55 - 59 bugfix
// Chrome 55 - 59 bugfix
if(ecb.scrollTo){
ecb.scrollTo({top: newY, behavior: 'smooth'});
}else{
// note the p..
ecb.scrollTop(newY);
$('#editorcontainerbox').scrollTop(newY);
}
}
}