@toolbox-web/grid-angular 0.19.1 → 0.19.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.
|
@@ -3821,7 +3821,17 @@ class BaseOverlayEditor extends BaseGridEditor {
|
|
|
3821
3821
|
return;
|
|
3822
3822
|
let justOpened = false;
|
|
3823
3823
|
let pendingHideRaf = 0;
|
|
3824
|
+
const hostEl = this._elementRef.nativeElement;
|
|
3824
3825
|
this._focusObserver = new MutationObserver((mutations) => {
|
|
3826
|
+
// Guard: if the editor's host element is no longer inside the cell,
|
|
3827
|
+
// it means the component was detached (e.g., editing session ended
|
|
3828
|
+
// and the render pipeline cleared the cell DOM). Disconnect to
|
|
3829
|
+
// prevent orphaned observers from opening stale overlay panels.
|
|
3830
|
+
if (!cell.contains(hostEl)) {
|
|
3831
|
+
this._focusObserver?.disconnect();
|
|
3832
|
+
this._focusObserver = null;
|
|
3833
|
+
return;
|
|
3834
|
+
}
|
|
3825
3835
|
for (const mutation of mutations) {
|
|
3826
3836
|
if (mutation.type !== 'attributes' || mutation.attributeName !== 'class')
|
|
3827
3837
|
continue;
|