diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue index ffb07080dc1f..6025c523050c 100644 --- a/client/src/components/Workflow/Editor/Index.vue +++ b/client/src/components/Workflow/Editor/Index.vue @@ -98,7 +98,7 @@ @onUpgrade="onUpgrade" /> -
+
stateStore.activeNodeId, + () => { + scrollToTop(); + } + ); + + const rightPanelElement = ref(null); + + function scrollToTop() { + rightPanelElement.value?.scrollTo({ + top: 0, + behavior: "instant", + }); + } + const { comments } = storeToRefs(commentStore); const { getStepIndex, steps } = storeToRefs(stepStore); const { activeNodeId } = storeToRefs(stateStore); @@ -427,6 +443,8 @@ export default { setAnnotation, tags, setTags, + rightPanelElement, + scrollToTop, connectionStore, hasChanges, hasInvalidConnections, @@ -914,9 +932,6 @@ export default { this.setCreator(creator); } }, - onActiveNode(nodeId) { - this.$refs["right-panel"].scrollTop = 0; - }, onInsertedStateMessages(insertedStateMessages) { this.insertedStateMessages = insertedStateMessages; this.hideModal();