mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-10 14:46:20 +02:00
tests: Further scroll fix for bug in Chrome 55-59 with scrollTo not working (#4185)
This commit is contained in:
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…
x
Reference in New Issue
Block a user