Skip to content

Commit eda0e8a

Browse files
committed
(fix) scroll icon position appearance
1 parent 93fb99f commit eda0e8a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ChatWindow/Room.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,11 @@ export default {
417417
this.hideOptions = true
418418
setTimeout(() => {
419419
if (!e.target) return
420-
this.scrollIcon =
421-
e.target.scrollHeight > 500 &&
422-
e.target.scrollHeight - e.target.scrollTop > 1000
420+
421+
const { scrollHeight, clientHeight, scrollTop } = e.target
422+
const bottomScroll = scrollHeight - clientHeight - scrollTop
423+
424+
this.scrollIcon = bottomScroll > 1000
423425
}, 200)
424426
})
425427

0 commit comments

Comments
 (0)