fix(editor): Fix connections disappearing after reactivating canvas and renaming a node (#7483)

Github issue / Community forum post (link here to close automatically):
-
https://community.n8n.io/t/1-11-1-possible-bug-all-nodes-randomly-losing-their-connectors/31856
- https://community.n8n.io/t/lines-between-nodes-have-disappeared/31846

---------

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
OlegIvaniv
2023-10-23 10:07:33 +02:00
committed by GitHub
parent 76c04815f7
commit 450e0cc66a
2 changed files with 35 additions and 1 deletions

View File

@@ -223,6 +223,7 @@ import {
WORKFLOW_LM_CHAT_MODAL_KEY,
AI_NODE_CREATOR_VIEW,
DRAG_EVENT_DATA_KEY,
UPDATE_WEBHOOK_ID_NODE_TYPES,
} from '@/constants';
import { copyPaste } from '@/mixins/copyPaste';
import { externalHooks } from '@/mixins/externalHooks';
@@ -345,7 +346,6 @@ import { EVENT_ADD_INPUT_ENDPOINT_CLICK } from '@/plugins/jsplumb/N8nAddInputEnd
import { sourceControlEventBus } from '@/event-bus/source-control';
import { getConnectorPaintStyleData, OVERLAY_ENDPOINT_ARROW_ID } from '@/utils/nodeViewUtils';
import { useViewStacks } from '@/components/Node/NodeCreator/composables/useViewStacks';
import { UPDATE_WEBHOOK_ID_NODE_TYPES } from '@/constants';
interface AddNodeOptions {
position?: XYPosition;
@@ -2894,6 +2894,7 @@ export default defineComponent({
this.instance.unbind(EVENT_CONNECTION_DETACHED, this.onConnectionDragAbortDetached);
this.instance.unbind(EVENT_PLUS_ENDPOINT_CLICK, this.onPlusEndpointClick);
this.instance.unbind(EVENT_ADD_INPUT_ENDPOINT_CLICK, this.onAddInputEndpointClick);
this.eventsAttached = false;
},
unbindEndpointEventListeners(bind = true) {
if (this.instance) {