diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index 0ceeea0050a76..2433fcf286e52 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -3777,6 +3777,12 @@ export default defineComponent({ this.disableNodes([node]); } }, + onPageShow(e: PageTransitionEvent) { + // Page was restored from the bfcache (back-forward cache) + if (e.persisted) { + this.stopLoading(); + } + }, }, async mounted() { this.resetWorkspace(); @@ -3880,6 +3886,7 @@ export default defineComponent({ document.addEventListener('keydown', this.keyDown); document.addEventListener('keyup', this.keyUp); window.addEventListener('message', this.onPostMessageReceived); + window.addEventListener('pageshow', this.onPageShow); this.$root.$on('newWorkflow', this.newWorkflow); this.$root.$on('importWorkflowData', this.onImportWorkflowDataEvent); @@ -3904,6 +3911,7 @@ export default defineComponent({ document.removeEventListener('keyup', this.keyUp); window.removeEventListener('message', this.onPostMessageReceived); window.removeEventListener('beforeunload', this.onBeforeUnload); + window.removeEventListener('pageshow', this.onPageShow); this.$root.$off('newWorkflow', this.newWorkflow); this.$root.$off('importWorkflowData', this.onImportWorkflowDataEvent);