The calculation here:
|
this.wasAtBottom = this.$refs.content.scrollTop + this.$refs.content.clientHeight >= this.$refs.content.scrollHeight - msg.getBoundingClientRect().height - 20 |
has a 20 pixel offset. I think this may have been there to account for a scrollbar, but when there isn't a scrollbar it causes the element to jump to the bottom from a greater distance than it should. Really the whole - msg.getBoundingClientRect().height - 20 part could be removed to only stay at the bottom if it really was at the bottom.
The calculation here:
ytc-filter/src/components/message-list.vue
Line 152 in e6c3630
has a 20 pixel offset. I think this may have been there to account for a scrollbar, but when there isn't a scrollbar it causes the element to jump to the bottom from a greater distance than it should. Really the whole
- msg.getBoundingClientRect().height - 20part could be removed to only stay at the bottom if it really was at the bottom.