Tip Details

Unable to click in text input boxes on Internet Explorer

Ran into a nasty problem in Internet Explorer (I was using IE7, unsure if this affects other versions of IE) where I could not click into a text input in a form. The form element was not disabled, and I spent a lot of time making sure there were no CSS issues keeping me from clicking into the text input and entering text. Other elements in the form such as radio buttons and selectboxes were working, but all of the inputs of type text were dead.

Turns out that this was being caused by a bug in the dojo setSelectable function where I was set the setSelectable attribute to false for a div element that contained the form. Dojo claims that the behavior of setSelectable is browser independent, but as of version 1.2 this is clearly not the case. It turns out that if you apply setSelectable and set the value to false on an element that contains form elements inside of it, you will no longer be able to click into any of the form input elements of type text.

This only happens on IE, not Firefox or Safari. Even weirder is that if you then try to apply setSelectable directly to those text inputs to set the value back to true, you still can not put the focus back into those form elements. It appears that in IE that if any of the parent elements have the attribute set to false, the text inputs will inherite this value and it can't be overridden.

Clearly a bug in dojo. But a very odd one, and one that is hard to hunt down. So if you are using dojo and calling setSelectable and you find problems with your form elements, now you know what you need to do.
Rating: 94% positive – 35 total Votes
I Like this Tip I Don't Like this Tip
Categories: javascript dojo programming coding internet explorer
Added: on Dec 09, 2008
Added By: Marcos84
Searches: text element form dojo input

Comments on this Tip

Add a Comment
I have this exact problem but i dont know what a "dojo" is on my computer. Could you guide me on how to fix this as not being able to type in the boxes is quite annoying, google chrome is a lot quicker but not all websites work with it (or firefox).
– Added by an anonymous user on Aug 06, 2009
This isn't anything that you, as a user of a site, can use to fix the problem.

The problem occurs when the person who develops/runs the site is using dojo in the way described. And this describes how to fix that problem... but the fix has to be implemented by the developer of the site.

One thing you can try as a user if you are having this problem is to turn off Javascript (probably in your preferences some place, I don't use IE so I can't say for sure). With Javascript disabled, this problem probably won't happen. But turning off Javascript may cause the site to stop working in other ways.
– Added by an anonymous user on Aug 07, 2009
Hi, I think you people are using multiple ie. because of this your ie. will not work properly. please check your pages in a genuine ie versions so that your problem resolved.
– Added by an anonymous user on Apr 13, 2010
Your Comment:
(how to format)
Keywords:
Rate This Tip:

Verify Humanity:
Sorry, we know it's annoying, but please enter the characters shown in the image to the left so that we know you're an actual person and not an evil spammer. Thanks.
       

Related Tips

compressing javascript

100% positive, 0 comments
– Tip added by an anonymous user on Jun 12, 2008

Detecting if a variable exists in Javascript

95% positive, 3 comments - last added on Feb 02, 2011
– Tip added by an anonymous user on Jul 22, 2008

attaching events to nodes in Javascript

no ratings, 0 comments
– Tip added by an anonymous user on Aug 18, 2008

Javascript: How to Create a Random Number

0% positive, 0 comments
– Tip added by Walkere on Feb 23, 2008

Migrating from dojo 0.4 to 1.0

no ratings, 0 comments
– Tip added by an anonymous user on Jan 08, 2008

jQuery ajax responseText empty

90% positive, 4 comments - last added on Apr 09, 2010
– Tip added by an anonymous user on Mar 27, 2009

Length of associative arrays in Javascript

90% positive, 1 comment - last added on May 22, 2010
– Tip added by an anonymous user on Nov 04, 2008

Matching any character in a javascript regular expression

96% positive, 6 comments - last added on Sep 03, 2010
– Tip added by an anonymous user on Aug 18, 2008

Unobfuscate javascript code

80% positive, 0 comments
– Tip added by an anonymous user on Feb 09, 2010

Checking for undefined variables in Javascript

100% positive, 1 comment - last added on Jul 14, 2009
– Tip added by an anonymous user on Jan 14, 2009

Internet Explorer not updating div content

100% positive, 0 comments
– Tip added by an anonymous user on Feb 09, 2010

reading select element values in javascript in IE7

100% positive, 0 comments
– Tip added by an anonymous user on Jul 17, 2009

Don't include a "length" attribute in a JSON Object

100% positive, 1 comment - last added on Feb 18, 2010
– Tip added by an anonymous user on Apr 10, 2009

Setting the Return-Path header when using mail in PHP

100% positive, 0 comments
– Tip added by an anonymous user on Dec 28, 2009

Using onClick events for links

100% positive, 0 comments
– Tip added by an anonymous user on Apr 08, 2010

Optional parameters in javascript functions

100% positive, 0 comments
– Tip added by an anonymous user on Jul 30, 2008

CSS3 selector for empty class name

Categories: Javascript CSS dojo jQuery
100% positive, 0 comments
– Tip added by an anonymous user on Dec 16, 2010

Using optional parameter in javascript

Categories: javascript programming
100% positive, 0 comments
– Tip added by an anonymous user on Jul 17, 2008

Debugging Javascript

100% positive, 0 comments
– Tip added by an anonymous user on Sep 12, 2008

animating elements with jQuery

50% positive, 0 comments
– Tip added by an anonymous user on Aug 04, 2008