We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bd8af1 commit 2ecc0ceCopy full SHA for 2ecc0ce
src/hooks/useAlign.ts
@@ -1,3 +1,4 @@
1
+import isVisible from 'rc-util/lib/dom/isVisible';
2
import useEvent from 'rc-util/lib/hooks/useEvent';
3
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
4
import * as React from 'react';
@@ -229,7 +230,7 @@ export default function useAlign(
229
230
if (
231
scaleX === 0 ||
232
scaleY === 0 ||
- (target instanceof HTMLElement && !target.offsetParent)
233
+ (target instanceof HTMLElement && !isVisible(target))
234
) {
235
return;
236
}
0 commit comments