dockview-core 6.2.1 → 6.2.2

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.2.1
3
+ * @version 6.2.2
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -11392,10 +11392,20 @@
11392
11392
  focusContainer.style.top = `${top}px`;
11393
11393
  focusContainer.style.width = `${width}px`;
11394
11394
  focusContainer.style.height = `${height}px`;
11395
- // Reveal after the first position is applied (was hidden to
11396
- // prevent a flash at 0,0 before the initial layout fires).
11397
- if (focusContainer.style.visibility === 'hidden') {
11395
+ // Sync visibility/pointer-events with the panel's current
11396
+ // visibility at paint time. visibilityChanged() may have
11397
+ // flipped to hidden between scheduling this rAF and now;
11398
+ // unconditionally clearing `visibility:hidden` here would
11399
+ // leave a hidden panel visually visible at a stale position,
11400
+ // because onDidDimensionsChange skips non-visible panels and
11401
+ // never recomputes their box on subsequent resizes.
11402
+ if (panel.api.isVisible) {
11398
11403
  focusContainer.style.visibility = '';
11404
+ focusContainer.style.pointerEvents = '';
11405
+ }
11406
+ else {
11407
+ focusContainer.style.visibility = 'hidden';
11408
+ focusContainer.style.pointerEvents = 'none';
11399
11409
  }
11400
11410
  toggleClass(focusContainer, 'dv-render-overlay-float', panel.group.api.location.type === 'floating');
11401
11411
  });
@@ -124,10 +124,20 @@ export class OverlayRenderContainer extends CompositeDisposable {
124
124
  focusContainer.style.top = `${top}px`;
125
125
  focusContainer.style.width = `${width}px`;
126
126
  focusContainer.style.height = `${height}px`;
127
- // Reveal after the first position is applied (was hidden to
128
- // prevent a flash at 0,0 before the initial layout fires).
129
- if (focusContainer.style.visibility === 'hidden') {
127
+ // Sync visibility/pointer-events with the panel's current
128
+ // visibility at paint time. visibilityChanged() may have
129
+ // flipped to hidden between scheduling this rAF and now;
130
+ // unconditionally clearing `visibility:hidden` here would
131
+ // leave a hidden panel visually visible at a stale position,
132
+ // because onDidDimensionsChange skips non-visible panels and
133
+ // never recomputes their box on subsequent resizes.
134
+ if (panel.api.isVisible) {
130
135
  focusContainer.style.visibility = '';
136
+ focusContainer.style.pointerEvents = '';
137
+ }
138
+ else {
139
+ focusContainer.style.visibility = 'hidden';
140
+ focusContainer.style.pointerEvents = 'none';
131
141
  }
132
142
  toggleClass(focusContainer, 'dv-render-overlay-float', panel.group.api.location.type === 'floating');
133
143
  });
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * dockview-core
3
- * @version 6.2.1
3
+ * @version 6.2.2
4
4
  * @link https://github.com/mathuo/dockview
5
5
  * @license MIT
6
6
  */
@@ -11388,10 +11388,20 @@ class OverlayRenderContainer extends CompositeDisposable {
11388
11388
  focusContainer.style.top = `${top}px`;
11389
11389
  focusContainer.style.width = `${width}px`;
11390
11390
  focusContainer.style.height = `${height}px`;
11391
- // Reveal after the first position is applied (was hidden to
11392
- // prevent a flash at 0,0 before the initial layout fires).
11393
- if (focusContainer.style.visibility === 'hidden') {
11391
+ // Sync visibility/pointer-events with the panel's current
11392
+ // visibility at paint time. visibilityChanged() may have
11393
+ // flipped to hidden between scheduling this rAF and now;
11394
+ // unconditionally clearing `visibility:hidden` here would
11395
+ // leave a hidden panel visually visible at a stale position,
11396
+ // because onDidDimensionsChange skips non-visible panels and
11397
+ // never recomputes their box on subsequent resizes.
11398
+ if (panel.api.isVisible) {
11394
11399
  focusContainer.style.visibility = '';
11400
+ focusContainer.style.pointerEvents = '';
11401
+ }
11402
+ else {
11403
+ focusContainer.style.visibility = 'hidden';
11404
+ focusContainer.style.pointerEvents = 'none';
11395
11405
  }
11396
11406
  toggleClass(focusContainer, 'dv-render-overlay-float', panel.group.api.location.type === 'floating');
11397
11407
  });