#9014 closed bug (invalid)
Opening a Dialog from a image hotspot in IE Compatibility mode
Reported by: | hargravejason | Owned by: | hargravejason |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.dialog | Version: | 1.10.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When I open a dialog box in IE10 Compatibility mode from a image map hotspot and attempt to close it, I get the following error:
Unhandled exception at line 132, column 3 in http://localhost:50723/Scripts/jquery-ui-1.10.0.js
0x800a138f - JavaScript runtime error: Unable to get property 'name' of undefined or null reference
I have traced the error to the image map, it determines in IE Compat that the element node name is "area" in non compat mode it finds it as body and works fine. The area map doesn't seem to find a parentNode which is the null its complaining about. This problem did not exist in the previous version. For my purposes I added a try/catch around the area portion of the code as such and I can continue without problem.
function focusable(element, isTabIndexNotNaN) {
try {
var map, mapName, img,
nodeName = element.nodeName.toLowerCase();
if ("area" === nodeName) {
map = element.parentNode; mapName = map.name;
if (!element.href !mapName map.nodeName.toLowerCase() !== "map") { return false;
} img = $("img[usemap=#" + mapName + "]")[0]; return !!img && visible(img);
}
} catch (e) { };
return ( /input|select|textarea|button|object/.test( nodeName ) ?
!element.disabled : "a" === nodeName ?
element.href isTabIndexNotNaN : isTabIndexNotNaN) &&
the element and all of its ancestors must be visible visible( element );
}
Not sure if this is a good fix or not, but that's what I did so far and it seems to work fine.
Change History (7)
comment:1 Changed 10 years ago by
Owner: | set to hargravejason |
---|---|
Status: | new → pending |
comment:2 Changed 10 years ago by
Status: | pending → new |
---|
Using Internet Explorer 10 and clicking on the compatibility mode icon near the address bar, I believe it puts it in IE7 quirks mode or something like that. As for a reduced test case, I'll see if I can drum up something somewhere to show the problem, might take a few days though.
comment:3 Changed 10 years ago by
Status: | new → pending |
---|
comment:4 Changed 10 years ago by
Quirks mode is not supported by jQuery or jQuery UI. Please confirm the specific mode you're in.
comment:5 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
comment:6 follow-up: 7 Changed 9 years ago by
I am experiencing this problem in Chrome on OS X. It appears that if the opener is an area and it gets dereferenced from the DOM while the dialog is open it no longer has a parent and the focusable function breaks.
comment:7 Changed 9 years ago by
Replying to tonytopper:
I am experiencing this problem in Chrome on OS X. It appears that if the opener is an area and it gets dereferenced from the DOM while the dialog is open it no longer has a parent and the focusable function breaks.
Hi tonytopper,
If you would like us to look into this we need a test case that shows this issue. You can use this as a starting point - http://jsfiddle.net/tj_vantoll/vwk3D/.
What compatibility mode are you in? Could you please provide a reduced test case showing the error?