@canlooks/can-ui 0.0.107 → 0.0.108
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.
|
@@ -382,7 +382,7 @@ function Popper({ ref, popperRef, anchorElement, container = document.body, effe
|
|
|
382
382
|
return;
|
|
383
383
|
}
|
|
384
384
|
const pointerOver = (e) => {
|
|
385
|
-
if (!isOvering.current && e.target
|
|
385
|
+
if (!isOvering.current && (0, utils_1.isChildOf)(e.target, anchorEl)) {
|
|
386
386
|
isOvering.current = true;
|
|
387
387
|
pointerEnterFn();
|
|
388
388
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { cloneElement, isValidElement, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
|
-
import { clsx, cloneRef, listenAllPredecessorsScroll, toArray, useControlled, useDerivedState, useForceUpdate, useSync, useSyncState, useUnmounted, useContainer, isElementOverflowed } from '../../utils';
|
|
4
|
+
import { clsx, cloneRef, listenAllPredecessorsScroll, toArray, useControlled, useDerivedState, useForceUpdate, useSync, useSyncState, useUnmounted, useContainer, isElementOverflowed, isChildOf } from '../../utils';
|
|
5
5
|
import { ClickAway } from '../clickAway';
|
|
6
6
|
import { classes, style } from './popper.style';
|
|
7
7
|
import { PopperContext, usePopperContext } from './popperContext';
|
|
@@ -379,7 +379,7 @@ export function Popper({ ref, popperRef, anchorElement, container = document.bod
|
|
|
379
379
|
return;
|
|
380
380
|
}
|
|
381
381
|
const pointerOver = (e) => {
|
|
382
|
-
if (!isOvering.current && e.target
|
|
382
|
+
if (!isOvering.current && isChildOf(e.target, anchorEl)) {
|
|
383
383
|
isOvering.current = true;
|
|
384
384
|
pointerEnterFn();
|
|
385
385
|
}
|