views:

491

answers:

4

I have 2 input boxes that are not disabled. When either gets focus no cursor is displayed and any text that you type in is not displayed. There are several events attached to these elements, but there are no js errors. Expected behavior occurs in IE7, IE8, FF2, FF3, Chrome, and Safari.

EDIT: Here is a code example of the events being attached. Note that I am using YUI 2.

YAHOO.util.Event.addListener(searchInputTop, 'focus', searchInputOnFocus);
YAHOO.util.Event.addListener(searchInputTop, 'blur', searchInputOnBlur);
searchInputOnBlur = function (e) 
{   
    if (e) 
    {   
        target = (e.target || e.srcElement);
    }   
    if (target && !target.value || target.value === "") 
    {   
        target.value = someDefault;
    }   
    target.className = 'someclass';
};  

searchInputOnFocus = function(e)
{   
    if (e) 
    {   
        target = (e.target || e.srcElement);
    }   
    if (target.value === currentDefaultText)
    {   
        target.value = ""; 
    }   
    target.className = "";
};

UPDATE:

I don't think any of my code has anything to do with it. Any page that I view in IE6 that has input boxes has the same behavior. I'm running IE6 by using Multiple IE's under Virtual box with Win Xp service pack 3.

A: 

I've had this exact same problem too. In my case it didn't even matter on which website I was, there wasn't a single textbox where I could enter text...

Lex
This seems to be the same problem I am having as well. It doesn't seem to be a code issue like I originally thought.
mk
A: 

Maybe this can help you pinpoint the source of your problem:

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/CSS/Q_23629941.html

Jonas B
Wow, you know how to use Google!
Josh Stodola
Although similar that is not the same problem, and I don't want the experts-exchange answer. The whole point of posting here was to get feedback from other devs in the community, not to get a link to an experts-exchange page.
mk
I only tried to help by showing a similar problem. Better than no answer at all no?
Jonas B
A: 

One likely explanation is that IE is stretching some transparent element such that it covers the input fields, due to one of its many weird CSS and layout bugs. Use a DOM inspector such as the IE Developer Toolbar to see if something is overlaid on them.

(I've linked to the Wikipedia page for the product as that's got a better chance of staying at the same URL for a while than one of those weird microsoft.com URLS with a thirty-two-digit hexadecimal number after it. The link to today's location for the download page on microsoft.com is at the bottom.)

NickFitz
That is not the case. This is happening on every page. I don't think it has anything to do with the code. It is probably my setup, but I am unsure.
mk
Yup, it sounds like the multiple IEs - I've known other people to have had problems with them.
NickFitz
+2  A: 

The problem is in MultipleIE itself.

Here: http://stackoverflow.com/questions/829665/ie6-forms-focus-disabled-on-input-fields-multiple-ies-after-ie8

someone suggested to uninstall MultipleIE and then try to access the files through Program Files (the files remain after the uninstall).

Another way to do it is installing "Internet Explorer Collection" instead of MultipleIE's.

(http://finalbuilds.edskes.net/iecollection.htm)

Hope this solves your issue.

Cheers

willvv
Awesome, thank you.
mk