mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04: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
1 changed files with 7 additions and 1 deletions
|
@ -596,7 +596,13 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
|
||||||
var line = $('#innerdocbody').find("div:nth-child("+(lineNumber+1)+")");
|
var line = $('#innerdocbody').find("div:nth-child("+(lineNumber+1)+")");
|
||||||
var newY = $(line)[0].offsetTop;
|
var newY = $(line)[0].offsetTop;
|
||||||
var ecb = document.getElementById('editorcontainerbox');
|
var ecb = document.getElementById('editorcontainerbox');
|
||||||
|
// Cjrome 55 - 59 bugfix
|
||||||
|
if(ecb.scrollTo){
|
||||||
ecb.scrollTo({top: newY, behavior: 'smooth'});
|
ecb.scrollTo({top: newY, behavior: 'smooth'});
|
||||||
|
}else{
|
||||||
|
// note the p..
|
||||||
|
ecb.scrollTop(newY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue