Skip to main content

Search and Top Navigation

#9014 closed bug (invalid)

Opened January 25, 2013 07:36PM UTC

Closed February 09, 2013 08:35AM UTC

Last modified November 20, 2013 01:09PM UTC

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.

Attachments (0)
Change History (7)

Changed January 25, 2013 07:44PM UTC by scottgonzalez comment:1

owner: → hargravejason
status: newpending

What compatibility mode are you in? Could you please provide a reduced test case showing the error?

Changed January 25, 2013 11:34PM UTC by hargravejason comment:2

status: pendingnew

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.

Changed January 26, 2013 02:21AM UTC by tj.vantoll comment:3

status: newpending

Changed January 26, 2013 03:33AM UTC by scottgonzalez comment:4

Quirks mode is not supported by jQuery or jQuery UI. Please confirm the specific mode you're in.

Changed February 09, 2013 08:35AM UTC by trac-o-bot comment:5

resolution: → invalid
status: pendingclosed

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!

Changed November 20, 2013 01:09AM UTC by tonytopper comment:6

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.

Changed November 20, 2013 01:09PM UTC by tj.vantoll comment:7

Replying to [comment:6 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/.