Skip to main content

Bug Tracker

Side navigation

#10973 closed bug (duplicate)

Opened December 07, 2011 01:24PM UTC

Closed December 07, 2011 06:08PM UTC

Last modified May 02, 2012 11:14PM UTC

ie8: can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: event Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

original ticket (10859) was closed by trac-o-bot.

comment was:

I'm getting the following error on IE 8.0:

Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E) Timestamp: Tue, 22 Nov 2011 18:03:26 UTC

Message: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

The piece of code indicated by IE was:

jQuery.event.triggered = type; elem[type](); jQuery.event.triggered = undefined;

commit:

https://github.com/jquery/jquery/commit/9aa553aa18e79989dfa002ae5a295f626951bdf5

Attachments (0)
Change History (6)

Changed December 07, 2011 04:09PM UTC by anonymous comment:1

I just upgraded from 1.6.2 to 1.7.1 and am seeing this on my existing code. Firefox and Chrome work fine; it's just IE (IE8 in my case).

Changed December 07, 2011 06:08PM UTC by sindresorhus comment:2

component: unfiledevent
priority: undecidedlow
resolution: → duplicate
status: newclosed

Add a jsfiddle testcase to the original ticket showing the issue, and I'll open it. Please refrain from opening duplicate issues.

Changed December 07, 2011 06:08PM UTC by sindresorhus comment:3

Duplicate of #10859.

Changed May 02, 2012 10:50PM UTC by jstrimpel@gmail.com comment:4

Any plans to fix this? I see that both associated bugs have been closed. I am going to through a painful $ and $.ui upgrade process and this is one of the pains. Wrapping every $.focus() statement in the code base in a try, catch is an unacceptable solution.

Changed May 02, 2012 11:00PM UTC by dmethvin comment:5

Yes, the fix is to not set focus to an element that the user cannot see. Please don't comment in duplicate tickets.

Changed May 02, 2012 11:14PM UTC by jstrimpel@gmail.com comment:6

I agree that is the correct procedure one should follow when coding. However, previous versions of jQuery allowed this or at the very least failed silently, which encouraged this bad practice. So now there is a code full of these errors, which needs to be patched because jQuery changed it's behavior/response to this bad coding practice.

Replying to [comment:5 dmethvin]:

Yes, the fix is to not set focus to an element that the user cannot see. Please don't comment in duplicate tickets.