Skip to content

Commit ac26943

Browse files
committed
Fix currentDocument typo, thanks @acusti
1 parent 9ba1dc5 commit ac26943

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/utils/positionFns.es6

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ export function getBoundPosition(draggable: Draggable, x: number, y: number): [n
1717
const node = ReactDOM.findDOMNode(draggable);
1818

1919
if (typeof bounds === 'string') {
20-
const {currentDocument} = node;
21-
const currentWindow = node.defaultView;
20+
const {ownerDocument} = node;
21+
const ownerWindow = node.defaultView;
2222
let boundNode;
2323
if (bounds === 'parent') {
2424
boundNode = node.parentNode;
2525
} else {
26-
boundNode = currentDocument.querySelector(bounds);
26+
boundNode = ownerDocument.querySelector(bounds);
2727
if (!boundNode) throw new Error('Bounds selector "' + bounds + '" could not find an element.');
2828
}
29-
const nodeStyle = currentWindow.getComputedStyle(node);
30-
const boundNodeStyle = currentWindow.getComputedStyle(boundNode);
29+
const nodeStyle = ownerWindow.getComputedStyle(node);
30+
const boundNodeStyle = ownerWindow.getComputedStyle(boundNode);
3131
// Compute bounds. This is a pain with padding and offsets but this gets it exactly right.
3232
bounds = {
3333
left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) +

0 commit comments

Comments
 (0)