fix status error
This commit is contained in:
parent
b479d80366
commit
4b18e0f36e
|
@ -308,7 +308,7 @@ const Status = {
|
||||||
watch: {
|
watch: {
|
||||||
'highlight': function (id) {
|
'highlight': function (id) {
|
||||||
if (this.status.id === id) {
|
if (this.status.id === id) {
|
||||||
let rect = this.$el.getBoundingClientRect()
|
let rect = this.$refs.root.getBoundingClientRect()
|
||||||
if (rect.top < 100) {
|
if (rect.top < 100) {
|
||||||
// Post is above screen, match its top to screen top
|
// Post is above screen, match its top to screen top
|
||||||
window.scrollBy(0, rect.top - 100)
|
window.scrollBy(0, rect.top - 100)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!-- eslint-disable vue/no-v-html -->
|
<!-- eslint-disable vue/no-v-html -->
|
||||||
<div
|
<div
|
||||||
v-if="!hideStatus"
|
v-if="!hideStatus"
|
||||||
|
ref="root"
|
||||||
class="Status"
|
class="Status"
|
||||||
:class="[{ '-focused': isFocused }, { '-conversation': inlineExpanded }]"
|
:class="[{ '-focused': isFocused }, { '-conversation': inlineExpanded }]"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue