Skip to content

Commit 49ea8f2

Browse files
sangar-1028gypaullin
authored andcommitted
[fix] use getBoundingClientRect instead of getRect for measureInWindow
Fix necolas#2589 Close necolas#2613
1 parent 3618e65 commit 49ea8f2

File tree

1 file changed

+2
-1
lines changed
  • packages/react-native-web/src/exports/UIManager

1 file changed

+2
-1
lines changed

packages/react-native-web/src/exports/UIManager/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* @noflow
88
*/
99

10+
import getBoundingClientRect from '../../modules/getBoundingClientRect';
1011
import setValueForStyles from '../../modules/setValueForStyles';
1112

1213
const getRect = (node) => {
@@ -82,7 +83,7 @@ const UIManager = {
8283
measureInWindow(node, callback) {
8384
if (node) {
8485
setTimeout(() => {
85-
const { height, left, top, width } = getRect(node);
86+
const { height, left, top, width } = getBoundingClientRect(node);
8687
callback(left, top, width, height);
8788
}, 0);
8889
}

0 commit comments

Comments
 (0)