Skip to main content

Search and Top Navigation

#6115 closed bug (notabug)

Opened September 27, 2010 06:18PM UTC

Closed October 01, 2010 06:53PM UTC

Last modified October 03, 2012 04:43PM UTC

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.

Attachments (0)
Change History (4)

Changed September 27, 2010 06:25PM UTC by chrisbarr comment:1

minor text update to the demo: http://jsbin.com/ecaqu4/2/edit

Changed September 27, 2010 06:42PM UTC by chrisbarr comment:2

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.

Changed October 01, 2010 06:53PM UTC by scottgonzalez comment:3

resolution: → invalid
status: newclosed

We don't support positioning hidden elements because jQuery core doesn't support getting the offset of hidden elements.

Changed October 03, 2012 04:43PM UTC by scottgonzalez comment:4

milestone: 1.next1.9.0