Skip to content

Commit d6f764d

Browse files
author
marker dao ®
committed
fix(overlay): domUtils.contains
1 parent 11ba779 commit d6f764d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/devextreme/js/__internal/ui/overlay/m_overlay.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,8 @@ class Overlay<
365365
const isAttachedTarget = $(window.document).is($target) || isTargetDocument;
366366
const isInnerOverlay = $($target).closest(`.${INNER_OVERLAY_CLASS}`).length;
367367
const isTargetContent = this._$content?.is($target);
368-
const isTargetInContent = domUtils.contains(this._$content?.get(0), target);
368+
const content = this._$content?.get(0);
369+
const isTargetInContent = content ? domUtils.contains(content, target) : false;
369370

370371
const isOutsideClick = isAttachedTarget
371372
&& !isInnerOverlay

0 commit comments

Comments
 (0)