#6115 closed bug (notabug)
Positioning hidden elements in Webkit is incorrect
Reported by: | chrisbarr | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.9.0 |
Component: | ui.position | Version: | 1.8.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
It appears that when you try to set the position of a hidden element in webkit (hidden by either visibility:hidden; or display:block;) that it does not get the correct position. I tested this as working fine in Firefox though.
I've put together a little demo that is similar to what I was doing when I discovered this bug that does simple form validation and displays an error message next the the invalid element.
The demo is at http://jsbin.com/ecaqu4 and the code is at http://jsbin.com/ecaqu4/edit
In the demo however, you should note that the position is corrected the second time you blur the invalid field since the error message is now visible.
Change History (4)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
After a bit more testing, this issue also occurs in IE8 and IE9 beta as well as webkit browsers (I tested Chrome 6 and Safari 5).
This bug does not occur in Firefox 3.6 or Firefox 4 beta and works as it should.
comment:3 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
We don't support positioning hidden elements because jQuery core doesn't support getting the offset of hidden elements.
comment:4 Changed 10 years ago by
Milestone: | 1.next → 1.9.0 |
---|
minor text update to the demo: http://jsbin.com/ecaqu4/2/edit