Skip to main content

Bug Tracker

Side navigation

#10859 closed bug (invalid)

Opened November 22, 2011 06:08PM UTC

Closed December 07, 2011 08:03AM UTC

Last modified February 03, 2014 11:09AM UTC

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: camilo.arthur@gmail.com Owned by: camilo.arthur@gmail.com
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

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;

Attachments (0)
Change History (9)

Changed November 22, 2011 06:13PM UTC by dmethvin comment:1

owner: → camilo.arthur@gmail.com
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

Changed December 07, 2011 08:03AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

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

#10973 is a duplicate of this ticket.

Changed December 15, 2011 05:41AM UTC by anonymous comment:4

I also found this error in IE8. I have a very simple page which include JQuery in the <header> section.

When trying to load the paeg, got a warning and nothing is displayed (empty page).

Error copied and shown below.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; CMNTDF; InfoPath.2; .NET4.0C; .NET4.0E)

Timestamp: Thu, 15 Dec 2011 05:37:51 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.

Line: 4

Char: 3806

Code: 0

URI: http://localhost:65106/Scripts/jquery-1.7.1.min.js

Changed January 30, 2012 11:26AM UTC by Mario Santos comment:5

I had the same issue on the latest jquery version (1.7.1, downloaded today!!) the solution was to put a try...catch statement around the condition. In my case, the problem was:

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; .NET4.0C; .NET4.0E)

Timestamp: Mon, 30 Jan 2012 10:58:01 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.

Line: 3175

And the lines affected:

Prevent re-triggering of the same event, since we already bubbled it above

jQuery.event.triggered = type;

elem[ type ]();

The code still haves a comment that points to a issue #1486 (4 years ago?)

IE<9 dies on focus/blur to hidden element (#1486)

http://bugs.jquery.com/ticket/1486

Changed March 12, 2012 09:29PM UTC by anonymous comment:6

putting a try catch around the focus call worked for me.

if(retainFocus){
				try {
					this.newelement[0].focus();
				} catch(err){
					return false;
				}
			}	

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

This shouldn't bomb. As it did not break in previous versions of jQuery. I agree that trying to set focus to a disabled element is bad practice, but jQuery's response to this action shouldn't change between releases.

Changed June 19, 2012 07:40AM UTC by anonymous comment:8

I just got the same error just visiting a page. Following the fact I have had multiple script errors for days, this is the first time I have seen this one

Changed February 03, 2014 11:09AM UTC by anonymous comment:9

I am also getting the same error

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

i have two calender in two tabs when i move to second tab and open the calendar of second tab i am getting this error.

please help.