| Issue 303: | IE6 not detected correctly when page contains an ASP.NET ScriptManager | |
| 2 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. Create an ASP.NET page with a ScriptManager included (you can also include some dropdowns and lisboxes to test the well-known bleeding of SELECT elements in IE6); 2. Test nyroModal in any way you like; What is the expected output? What do you see instead? In IE6, the behavior is broken: the modal shows, but it's height appears to be miscalculated and the SELECT elements aren't hidden (what causes them to bleed through). What version of the product are you using? On what operating system? nyroModal 1.5.0 (version 1.5.1 has the same problem) on Windows. Please provide any additional information below.
Aug 6, 2009
As a suggested resolution, I came up with the following line: var isIE6 = (/msie/.test(userAgent) && !/opera/.test(userAgent) && parseInt(browserVersion) < 7 && (!window.XMLHttpRequest || typeof(XMLHttpRequest) === 'function')); The "typeof(XMLHttpRequest) === 'function'" evaluation allow us to distinguish between the XMLHttpRequest object native support (IE7 and above) and the XMLHttpRequest function injected by the ASP.NET ScriptManager. Strangely enough (or not, I don't know...), the "typeof(XMLHttpRequest) === 'function'" check evaluates to true in Firefox, altough it has XMLHttpRequest native support. However, this Firefox behavior won't be a problem, since this check won't ever be made in this browser (the initial checks of "userAgent" and "browserVersion" will short-circuit the evaluation). I have successfully tested this suggested solution in Firefox 3.5.2, IE6, IE7 and IE8.
Aug 22, 2009
Thanks for your fix, and sorry for the delay. Your fix will be included in the next version.
Status:
Accepted
Labels: Type-Defect
Nov 8, 2009
the version 1.5.4 is now here and include your code.
Status:
Fixed
|
I've been looking carefully into this and I think the problem may be that the isIE6 variable isn't correctly evaluated when a ScriptManager is present in the page. As it turns out, in nyroModal 1.5.0 and up, the following condition was added to the isIE6 assignment check: "(...) && !window.XMLHttpRequest". This works generally well but, once you add an ASP.NET ScriptManager, it stops working. Examining the JavaScript code injected by ScriptManager into the page, I found this: "if(!window.XMLHttpRequest)window.XMLHttpRequest=function(){var b (...)". I guess this is the reason why the IE6 check breaks, right? With a ScriptManager present, the condition "!window.XMLHttpRequest" appears never to be true.