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.
@@ -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
  */
@@ -7326,8 +7326,23 @@ class Tabs extends CompositeDisposable {
7326
7326
  new PanelTransfer(this.accessor.id, this.group.id, null, tabGroup.id),
7327
7327
  ], PanelTransfer.prototype);
7328
7328
  const iframes = disableIframePointEvents();
7329
+ // The dragend listener on `_tabsList` is unreachable for chip
7330
+ // drags because cross-group drops detach the chip from the DOM
7331
+ // before dragend fires (the source tab group becomes empty, so
7332
+ // `_positionChipForGroup` removes the chip element). Without
7333
+ // bubbling, the tabsList listener never runs and `_animState`,
7334
+ // `_chipDragCleanup`, and the dragging CSS classes leak. Listen
7335
+ // directly on the chip element so cleanup happens regardless of
7336
+ // whether it's still attached. (Issue #1254.)
7337
+ const chipElement = chip.element;
7338
+ const onChipDragEnd = () => {
7339
+ chipElement.removeEventListener('dragend', onChipDragEnd);
7340
+ this.resetDragAnimation();
7341
+ };
7342
+ chipElement.addEventListener('dragend', onChipDragEnd);
7329
7343
  this._chipDragCleanup = {
7330
7344
  dispose: () => {
7345
+ chipElement.removeEventListener('dragend', onChipDragEnd);
7331
7346
  panelTransfer.clearData(PanelTransfer.prototype);
7332
7347
  iframes.release();
7333
7348
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dockview-core",
3
- "version": "6.0.6",
3
+ "version": "6.0.7",
4
4
  "description": "Zero dependency layout manager supporting tabs, groups, grids and splitviews for vanilla TypeScript",
5
5
  "keywords": [
6
6
  "splitview",