fix status error

This commit is contained in:
Henry Jameson 2021-04-25 13:33:02 +03:00
parent b479d80366
commit 4b18e0f36e
2 changed files with 2 additions and 1 deletions

View file

@ -308,7 +308,7 @@ const Status = {
watch: {
'highlight': function (id) {
if (this.status.id === id) {
let rect = this.$el.getBoundingClientRect()
let rect = this.$refs.root.getBoundingClientRect()
if (rect.top < 100) {
// Post is above screen, match its top to screen top
window.scrollBy(0, rect.top - 100)

View file

@ -2,6 +2,7 @@
<!-- eslint-disable vue/no-v-html -->
<div
v-if="!hideStatus"
ref="root"
class="Status"
:class="[{ '-focused': isFocused }, { '-conversation': inlineExpanded }]"
>