dockview-core 6.0.6 → 6.0.7

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.
@@ -898,8 +898,23 @@ var Tabs = /** @class */ (function (_super) {
898
898
  new dataTransfer_1.PanelTransfer(this.accessor.id, this.group.id, null, tabGroup.id),
899
899
  ], dataTransfer_1.PanelTransfer.prototype);
900
900
  var iframes = (0, dom_1.disableIframePointEvents)();
901
+ // The dragend listener on `_tabsList` is unreachable for chip
902
+ // drags because cross-group drops detach the chip from the DOM
903
+ // before dragend fires (the source tab group becomes empty, so
904
+ // `_positionChipForGroup` removes the chip element). Without
905
+ // bubbling, the tabsList listener never runs and `_animState`,
906
+ // `_chipDragCleanup`, and the dragging CSS classes leak. Listen
907
+ // directly on the chip element so cleanup happens regardless of
908
+ // whether it's still attached. (Issue #1254.)
909
+ var chipElement = chip.element;
910
+ var onChipDragEnd = function () {
911
+ chipElement.removeEventListener('dragend', onChipDragEnd);
912
+ _this.resetDragAnimation();
913
+ };
914
+ chipElement.addEventListener('dragend', onChipDragEnd);
901
915
  this._chipDragCleanup = {
902
916
  dispose: function () {
917
+ chipElement.removeEventListener('dragend', onChipDragEnd);
903
918
  panelTransfer.clearData(dataTransfer_1.PanelTransfer.prototype);
904
919
  iframes.release();
905
920
  },
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 6.0.6
3
+ * @version 6.0.7
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -7362,8 +7362,23 @@
7362
7362
  new PanelTransfer(this.accessor.id, this.group.id, null, tabGroup.id),
7363
7363
  ], PanelTransfer.prototype);
7364
7364
  const iframes = disableIframePointEvents();
7365
+ // The dragend listener on `_tabsList` is unreachable for chip
7366
+ // drags because cross-group drops detach the chip from the DOM
7367
+ // before dragend fires (the source tab group becomes empty, so
7368
+ // `_positionChipForGroup` removes the chip element). Without
7369
+ // bubbling, the tabsList listener never runs and `_animState`,
7370
+ // `_chipDragCleanup`, and the dragging CSS classes leak. Listen
7371
+ // directly on the chip element so cleanup happens regardless of
7372
+ // whether it's still attached. (Issue #1254.)
7373
+ const chipElement = chip.element;
7374
+ const onChipDragEnd = () => {
7375
+ chipElement.removeEventListener('dragend', onChipDragEnd);
7376
+ this.resetDragAnimation();
7377
+ };
7378
+ chipElement.addEventListener('dragend', onChipDragEnd);
7365
7379
  this._chipDragCleanup = {
7366
7380
  dispose: () => {
7381
+ chipElement.removeEventListener('dragend', onChipDragEnd);
7367
7382
  panelTransfer.clearData(PanelTransfer.prototype);
7368
7383
  iframes.release();
7369
7384
  },