Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#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:


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 and the code is at

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 in reply to:  description Changed 12 years ago by chrisbarr

minor text update to the demo:

comment:2 Changed 12 years ago by chrisbarr

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 Scott González

Resolution: invalid
Status: newclosed

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 Scott González

Milestone: 1.next1.9.0
Note: See TracTickets for help on using tickets.