-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Closed
Labels
Milestone
Description
Description
In your document, i find:
Note: jQuery does not support getting the offset coordinates of hidden elements or accounting for borders, margins, or padding set on the body element.
And in your code, it's:
// Make sure element is not hidden (display: none)
if ( rect.width || rect.height ) {
...
}So how about element shown but with 0 width and height? Seems it's belong to hidden element in your code and get wrong offset value.
Is that a feature or issue? Since there may be some chance i need to know a element's offset which is shown but has no size.
Link to test case
In this test case you will see element with no size get wrong offset.
bumbu