Skip to content

wasAtBottom calculation slightly off #91

@Yay295

Description

@Yay295

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions