Tip Details Add a Related Tip

Rate as: Positive Negative

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: 100% positive, 2 total Votes
Categories: javascript dojo programming coding internet explorer
Added: on Dec 09, 2008 at 10:49 am
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 at 2:52 pm
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 at 4:57 pm
Your Comment:
(how to format)
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 at 3:02 pm

Detecting if a variable exists in Javascript

100% positive, 2 comments - last added on Oct 21, 2009 at 2:29 pm
– Tip added by an anonymous user on Jul 22, 2008 at 8:31 am

attaching events to nodes in Javascript

no ratings, 0 comments
– Tip added by an anonymous user on Aug 18, 2008 at 11:23 am

Javascript: How to Create a Random Number

0% positive, 0 comments
– Tip added by Walkere on Feb 23, 2008 at 9:49 pm

Migrating from dojo 0.4 to 1.0

no ratings, 0 comments
– Tip added by an anonymous user on Jan 08, 2008 at 12:44 pm

Telling when an iframe is done loading

85% positive, 3 comments - last added on May 16, 2009 at 7:48 am
– Tip added by an anonymous user on Apr 18, 2008 at 8:05 am

jQuery ajax responseText empty

100% positive, 2 comments - last added on Aug 25, 2009 at 9:58 am
– Tip added by an anonymous user on Mar 27, 2009 at 8:26 am

Length of associative arrays in Javascript

100% positive, 0 comments
– Tip added by an anonymous user on Nov 04, 2008 at 10:13 am

Matching any character in a javascript regular expression

100% positive, 2 comments - last added on Oct 08, 2009 at 2:33 am
– Tip added by an anonymous user on Aug 18, 2008 at 9:06 am

reading select element values in javascript in IE7

100% positive, 0 comments
– Tip added by an anonymous user on Jul 17, 2009 at 1:28 pm

Optional parameters in javascript functions

100% positive, 0 comments
– Tip added by an anonymous user on Jul 30, 2008 at 10:44 am

Using optional parameter in javascript

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

Javascript Error: unterminated regular expression literal

50% positive, 0 comments
– Tip added by marty on Jun 26, 2008 at 1:20 pm

Referencing methods in PHP usort

Categories: php coding programming
66% positive, 0 comments
– Tip added by an anonymous user on Jun 13, 2008 at 11:18 am

How to Find a Random Date in PHP

20% positive, 0 comments
– Tip added by Walkere on Feb 07, 2008 at 8:25 pm

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

100% positive, 0 comments
– Tip added by an anonymous user on Apr 10, 2009 at 4:51 pm

Checking for undefined variables in Javascript

100% positive, 1 comment - last added on Jul 14, 2009 at 5:13 pm
– Tip added by an anonymous user on Jan 14, 2009 at 9:47 am

Debugging Javascript

100% positive, 0 comments
– Tip added by an anonymous user on Sep 12, 2008 at 2:35 pm

How to Syndicate an RSS Feed On Your Site

100% positive, 0 comments
– Tip added by Walkere on Feb 09, 2008 at 5:48 pm

animating elements with jQuery

0% positive, 0 comments
– Tip added by an anonymous user on Aug 04, 2008 at 1:46 pm