Skip to content

Commit

Permalink
test scrolltop issue on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
vj-abishek committed Apr 20, 2021
1 parent 8728c34 commit 8d314d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Components/Channel/Chat/Conversation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function Conversation({

const handleScroll = (e) => {
const { target } = e;

console.log(target.scrollTop)
if (
isMobile && (getChromeVersion() <= 80) &&
!(target.scrollTop + 50 >= target.scrollHeight - target.clientHeight)
Expand All @@ -135,6 +135,7 @@ function Conversation({

const isOldMobileBrowser = isMobile && (getChromeVersion() <= 80);
console.log(getChromeVersion() <= 80)
console.log(getChromeVersion())
if (isOldMobileBrowser) {
console.log('Inside', ChatBox.current.scrollHeight);
ChatBox.current.scrollTo(0, ChatBox.current.scrollHeight);
Expand Down

1 comment on commit 8d314d6

@vercel
Copy link

@vercel vercel bot commented on 8d314d6 Apr 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.