Skip to main content

Search and Top Navigation

#9592 closed bug (notabug)

Opened October 07, 2013 11:59PM UTC

Closed October 10, 2013 07:08PM UTC

Datepicker Position Problem in IE 8

Reported by: randjc Owned by: randjc
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:
Description

I had a Problem using the ui.datepicker with IE8. The Datepicker was shown in the wrong Position when the browser window was scrolled down the date dialog would show up at the top of the page. See Ticket #3232, this issue was fixed once already and is now back.

--JQuery workaround for IE


$(".ui-datepicker-trigger").on("click", function() {
	var self;
	
	if (navigator.userAgent.match(/msie/i)) {
		var scrollTopValue = document.body.scrollTop || window.pageYOffset 
			|| (document.body.parentElement
			?document.body.parentElement.scrollTop:
			$(window).scrollTop());
		self = $(this);
		$("#ui-datepicker-div").hide();
		setTimeout(function(){
			$("#ui-datepicker-div").css({
				top: self.offset().top + scrollTopValue + 25
			});
			$("#ui-datepicker-div").show();
		}, 0); 
	}
});
Attachments (0)
Change History (9)

Changed October 08, 2013 12:15AM UTC by scottgonzalez comment:1

owner: → randjc
status: newpending

Are you just filing a duplicate of #5585?

Changed October 08, 2013 04:31PM UTC by randjc comment:2

status: pendingnew

Replying to [comment:1 scott.gonzalez]:

Are you just filing a duplicate of #5585?

Not exactly, but it's similar, could be a duplicate of 5585 or 3232 (which was fixed and now it's back, regression)

5585 talks about it disappearing when you scroll, that's not the issue, it's in the wrong place since the calculation for the vertical placement is not right. You scroll down to the bottom of view and click the calendar icon, the calendar pops up at the top of the page, so you have scroll back up to see it. Isn't 5585 is closed and will not be addressed unless I'm reading this wrong?

Changed October 08, 2013 04:53PM UTC by scottgonzalez comment:3

status: newpending

Oh, yes, I had missed that it was closed as a duplicate. Can you please provide a reduced test case showing the problem? You can use http://jsfiddle.net/tj_vantoll/tRdpr/ as a starting point, which uses the latest code from master.

Changed October 09, 2013 05:07PM UTC by randjc comment:4

status: pendingnew

IE 8 example, but I wasn't able to fully test.

http://jsfiddle.net/tRdpr/76/

Changed October 09, 2013 05:18PM UTC by tj.vantoll comment:5

status: newpending

Are you doing anything special to recreate this problem? I'm not seeing any issues on this test case http://jsfiddle.net/tRdpr/76/.

Changed October 09, 2013 11:29PM UTC by randjc comment:6

status: pendingnew

Did you test it in IE8?

Changed October 10, 2013 03:24PM UTC by tj.vantoll comment:7

status: newpending

Replying to [comment:6 randjc]:

Did you test it in IE8?

Yeah I'm not seeing any positioning issues on http://jsfiddle.net/tRdpr/76/ in IE8 on Windows XP.

Changed October 10, 2013 06:43PM UTC by randjc comment:8

status: pendingnew

Seems to only happen when IE8 is in quirky mode, with out the <!DOCTYPE html> tag on the page.

http://jsfiddle.net/randjc/RLsTc/3/

Changed October 10, 2013 07:08PM UTC by scottgonzalez comment:9

resolution: → notabug
status: newclosed

jQuery doesn't support quirks mode.