Opened 7 years ago

Closed 7 years ago

#9592 closed bug (notabug)

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); 
	}
});

Change History (9)

comment:1 Changed 7 years ago by Scott González

Owner: set to randjc
Status: newpending

Are you just filing a duplicate of #5585?

comment:2 in reply to:  1 Changed 7 years ago by randjc

Status: pendingnew

Replying to 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?

comment:3 Changed 7 years ago by Scott González

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.

comment:4 Changed 7 years ago by randjc

Status: pendingnew

IE 8 example, but I wasn't able to fully test. http://jsfiddle.net/tRdpr/76/

comment:5 Changed 7 years ago by tj.vantoll

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/.

comment:6 Changed 7 years ago by randjc

Status: pendingnew

Did you test it in IE8?

comment:7 in reply to:  6 Changed 7 years ago by tj.vantoll

Status: newpending

Replying to 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.

comment:8 Changed 7 years ago by randjc

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/

comment:9 Changed 7 years ago by Scott González

Resolution: notabug
Status: newclosed

jQuery doesn't support quirks mode.

Note: See TracTickets for help on using tickets.