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 c629b9c commit c2424ebCopy full SHA for c2424eb
src/hooks/useAlign.ts
@@ -213,13 +213,15 @@ export default function useAlign(
213
} else {
214
const rect = target.getBoundingClientRect();
215
targetRect = {
216
- x: rect.x,
217
- y: rect.y,
+ x: rect.x || rect.left,
+ y: rect.y || rect.top,
218
width: rect.width,
219
height: rect.height,
220
};
221
}
222
const popupRect = popupElement.getBoundingClientRect();
223
+ popupRect.x = popupRect.x || popupRect.left;
224
+ popupRect.y = popupRect.y || popupRect.top;
225
const {
226
clientWidth,
227
clientHeight,
0 commit comments