Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE8 issue #278

Closed
allannienhuis opened this issue Nov 21, 2013 · 1 comment
Closed

IE8 issue #278

allannienhuis opened this issue Nov 21, 2013 · 1 comment

Comments

@allannienhuis
Copy link

Hi there. I'm having an issue in IE8 (tested on XP) with the date and time pickers not sending the picked values to the input fields linked. I've traced it down to the following code in picker.js, line 131:
activeElement = activeElement && (activeElement.type || activeElement.href).

in IE8 in my environment this results in activeElement = undefined.

So the test on line 134 will fail (jquery/sizzle throws an exception because of the undefined object).

I fixed this by simply changing line 134 to:
if (targetDisabled || ! $(ELEMENT).is(':focus') ) {

$target might have been a better option than $(ELEMENT) but I thought I'd use the same object that was used to focus the control on line 135 to make it clearer what was going on for me :).

That code should work on jquery v 1.7.2 and up (I tested with 1.7.2), which I believe is the minimum version you support.

I'm not sure whether lines 130 and 131 (setting the activeElement) are still required - I didn't see another reference to them in the code in that file. However, activeElement looks like it is set at a higher scope - possibly global, so I didn't want to suggest a change to that code. The fact that the activeElement variable is not scoped locally might be a bug, but it doesn't seem to affect the use in my configuration.

Cheers,
Allan.

@amsul amsul closed this as completed in f2c8d04 Dec 5, 2013
@mariofischer
Copy link

Hi -

a similar error still happens in line 133: ELEMENT.focus()
I added a browser detection line there but that doesn't seem to be the best idea so if you would have a look, thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants