Skip to main content

Search and Top Navigation

#1998 closed bug (fixed)

Opened December 03, 2007 10:43AM UTC

Closed January 02, 2008 11:04PM UTC

Last modified February 26, 2009 11:19AM UTC

UI.DatePicker is positioned incorrectly in a scrolling div

Reported by: DaveJamesMiller Owned by:
Priority: major Milestone: 1.5
Component: ui.core Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:
Description

I have a field with UI.DatePicker attached inside a scrolling div, and when you scroll down in the DIV, the popup shows in the wrong place. I made the following change - it seems to work for me in IE7, FF2, Opera, but I do not know if there will be any side effects or problems in other browsers.

	/* Find an object's position on the screen. */
	_findPos: function(obj) {
		while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
			obj = obj.nextSibling;
		}
		// START HACK -DJM
		var pos = $(obj).offset();
		return [pos.left, pos.top];
		// END HACK -DJM
		// -SNIP-
	}

The HTML is something like this:

<div style="overflow: auto; height: 200px">
<br /><br /><br /><br /><br />
<input name="date" />
<br /><br /><br /><br /><br />
</div>
Attachments (0)
Change History (3)

Changed January 02, 2008 11:04PM UTC by kbwood comment:1

milestone: → 1.2.2
resolution: → fixed
status: newclosed

The datepicker has been patched to correct this problem.

Changed May 24, 2008 03:39AM UTC by comment:2

milestone: 1.2.2

Milestone 1.2.2 deleted

Changed February 26, 2009 11:19AM UTC by paul comment:3

milestone: → 1.5