diff --git a/frontend/components/feedback-task/container/fields/span-annotation/components/EntityComponent.vue b/frontend/components/feedback-task/container/fields/span-annotation/components/EntityComponent.vue index c8d70b8c8a..7c53bbdbcb 100644 --- a/frontend/components/feedback-task/container/fields/span-annotation/components/EntityComponent.vue +++ b/frontend/components/feedback-task/container/fields/span-annotation/components/EntityComponent.vue @@ -96,6 +96,8 @@ export default { }, }, mounted() { + this.scroll = this.getScrollParent(document.getElementById("spanEntity")); + if (this.scroll) { this.scroll.addEventListener("scroll", this.getPosition); } @@ -105,9 +107,6 @@ export default { this.scroll.removeEventListener("scroll", this.getPosition); } }, - created() { - this.scroll = this.getScrollParent(document.getElementById("spanEntity")); - }, };