@vectoriox/iox-builder 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4454,16 +4454,21 @@ class BuilderComponent {
|
|
|
4454
4454
|
}
|
|
4455
4455
|
});
|
|
4456
4456
|
this.canvasRo.observe(canvasEl);
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4457
|
+
}
|
|
4458
|
+
// The canvas is an EDITING surface: clicking a Link / LinkedContainer / Button (anything
|
|
4459
|
+
// rendering an <a href>) must select it, never navigate — a redirect unloads the builder and
|
|
4460
|
+
// loses unsaved work. Bound to `.preview` (NOT #canvas-preview) so it also covers the
|
|
4461
|
+
// GLOBAL-elements overlay, which is a SIBLING layer outside the page canvas — a linked
|
|
4462
|
+
// container in a global header used to slip past the old canvas-only guard and navigate.
|
|
4463
|
+
// Capture phase so it runs before the node's own click handler; it covers EVERY anchor,
|
|
4464
|
+
// including repeater/slider preview clones (RenderDirective skips their per-node listeners)
|
|
4465
|
+
// and any future link component. preventDefault only cancels default navigation — the click
|
|
4466
|
+
// still propagates, so selection/overlay behaviour is unchanged. `auxclick` covers
|
|
4467
|
+
// middle-click, which opens a tab without firing `click`.
|
|
4468
|
+
const previewEl = this.previewCanvas?.nativeElement;
|
|
4469
|
+
if (previewEl) {
|
|
4470
|
+
previewEl.addEventListener('click', this.blockCanvasNavigation, true);
|
|
4471
|
+
previewEl.addEventListener('auxclick', this.blockCanvasNavigation, true);
|
|
4467
4472
|
}
|
|
4468
4473
|
this.initLenis();
|
|
4469
4474
|
// Moveable path (flag-gated — interact.js is untouched when off). Drive drag for the selected
|
|
@@ -4513,8 +4518,11 @@ class BuilderComponent {
|
|
|
4513
4518
|
const canvasEl = document.getElementById('canvas-preview');
|
|
4514
4519
|
if (canvasEl) {
|
|
4515
4520
|
this.dragEngine.unregisterDropzone('canvas-preview', canvasEl);
|
|
4516
|
-
|
|
4517
|
-
|
|
4521
|
+
}
|
|
4522
|
+
const previewEl = this.previewCanvas?.nativeElement;
|
|
4523
|
+
if (previewEl) {
|
|
4524
|
+
previewEl.removeEventListener('click', this.blockCanvasNavigation, true);
|
|
4525
|
+
previewEl.removeEventListener('auxclick', this.blockCanvasNavigation, true);
|
|
4518
4526
|
}
|
|
4519
4527
|
}
|
|
4520
4528
|
/**
|