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 a53c077 commit 78caaf9Copy full SHA for 78caaf9
src/hooks/useAlign.ts
@@ -167,11 +167,7 @@ export default function useAlign(
167
const doc = popupElement.ownerDocument;
168
const win = getWin(popupElement);
169
170
- const {
171
- width,
172
- height,
173
- position: popupPosition,
174
- } = win.getComputedStyle(popupElement);
+ const { position: popupPosition } = win.getComputedStyle(popupElement);
175
176
const originLeft = popupElement.style.left;
177
const originTop = popupElement.style.top;
@@ -222,6 +218,7 @@ export default function useAlign(
222
218
};
223
219
}
224
220
const popupRect = popupElement.getBoundingClientRect();
221
+ const { height, width } = win.getComputedStyle(popupElement);
225
popupRect.x = popupRect.x ?? popupRect.left;
226
popupRect.y = popupRect.y ?? popupRect.top;
227
const {
0 commit comments