tests: Further scroll fix for bug in Chrome 55-59 with scrollTo not working (#4185)
parent
c394b65e75
commit
3d89eed31a
|
@ -596,7 +596,13 @@ 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');
|
||||
ecb.scrollTo({top: newY, behavior: 'smooth'});
|
||||
// Cjrome 55 - 59 bugfix
|
||||
if(ecb.scrollTo){
|
||||
ecb.scrollTo({top: newY, behavior: 'smooth'});
|
||||
}else{
|
||||
// note the p..
|
||||
ecb.scrollTop(newY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue