reverting changes in polish manually
This commit is contained in:
parent
664a9d06f9
commit
fb14847730
6 changed files with 60 additions and 20 deletions
|
|
@ -7,11 +7,13 @@ const initScroll = (elementId) => {
|
|||
}
|
||||
|
||||
const isBottom = () => {
|
||||
return el.scrollHeight - el.clientHeight <= el.scrollTop + 1;
|
||||
if (el) {
|
||||
return el.scrollHeight - el.clientHeight <= el.scrollTop + 1;
|
||||
}
|
||||
}
|
||||
|
||||
const adjustScroll = () => {
|
||||
if (isBottom()) {
|
||||
if (el) {
|
||||
el.scrollTo({
|
||||
top: el.scrollHeight - el.clientHeight,
|
||||
behavior: 'smooth'
|
||||
|
|
|
|||
Loading…
Reference in a new issue