Why would javascript click-areas not be working in IE8?

Posted by Edward Tanguay on Stack Overflow See other posts from Stack Overflow or by Edward Tanguay
Published on 2009-04-01T13:46:32Z Indexed on 2010/04/09 14:23 UTC
Read the original article Hit count: 442

I'm trying to find a bug in an old ASP.NET application which causes IE8 to not be able to click on the following "button" area in our application:

<td 
    width="150px" 
    class="ctl00_CP1_UiCommandManager1i toolBarItem" 
    valign="middle" 
    onmouseout="onMouseOverCommand(this,1,'ctl00_CP1_UiCommandManager1',0,0);" 
    onmouseover="onMouseOverCommand(this,0,'ctl00_CP1_UiCommandManager1',0,0);" 
    onmousedown="onMouseDownCommand(this, 'ctl00_CP1_UiCommandManager1', 0, 0);" 
    onmouseup="onMouseUpCommand(this, 'ctl00_CP1_UiCommandManager1', 0, 0);" 
    id="ctl00_CP1_UiCommandManager1_0_0">

    <span style="width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;">
    	NEW
    </span>
</td>

When we switch IE8 to IE7 compatibility mode, the problem disappears, IE7 is able to click on it.

Since the above HTML is generated by a third party control (Janus, http://www.janusys.com/controls), we don't have the source code.

  • has anyone experienced any similar problems with IE8?
  • I've determined that it actually fires the onMouseDownCommand command
  • also the CSS of the button area is different in IE8, it doesn't have color shading that it does in IE7. I can imagine that somewhere the HTML is not valid and IE8 being stricter is not playing along, but where?
  • any advice on how to narrow in on this bug welcome

ANSWER:

Turned out to be that the application was not checking the navigator.agent for "MSIE 8.0" and was thus treating IE8 has a non-Internet-Explorer browser.

Thanks Lazarus for the tip, the IE8 Javascript debugger is very nice, like a Firebug for IE, will be using it more!

© Stack Overflow or respective owner

Related posts about visual-studio-2005

Related posts about ie8