Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#10957 closed defect (fixed)

[patch] [ccla] Dialog: using an iframe as the contents of a dialog causes and error in Firefox

Reported by: Becky Gibson Owned by: Becky Gibson
Priority: high Milestone: 1.5
Component: Accessibility Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:

Description

Create a dialog with an iframe:

<div dojoType="dijit.Dialog" id="dlgFrame" title="Search" >
	<iframe title="Google" src="http://www.google.com" style="width:800px; height: 600px;">
	</iframe>
</div>

In the console on Firefox will get: "Error: permission denied for <http://serverURL> to get property HTMLDocument.designMode from <http://www.google.com>"

This is because isTabNavigable() in dijit/_base/manager.js is doing: return elem.contentDocument.designMode == "on"; and it is throwing the error. This error prevents focus from going to the dialog container. And focus is not trapped within the dialog.

However Dijit does not support dialogs which contain iframes because we have no way of trapping focus within the iFrame without searching for all of the tabnavigable items within the iframe once it is loaded. This is too much overhead to add to the code to support this iframe use case.

The Firefox error should be caught so that at least focus is trapped on the dialog container and it can be closed via the keyboard. A developer wanting this use case could probably use the dijit funtions to find all of the tabnavigable items in the dialog and implement the trapping of focus within the dialog manually.

Attachments (1)

10957.patch (709 bytes) - added by Becky Gibson 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Becky Gibson

Attachment: 10957.patch added

comment:1 Changed 9 years ago by Becky Gibson

Summary: Dialog: using an iframe as the contents of a dialog causes and error in Firefox[patch] [ccla] Dialog: using an iframe as the contents of a dialog causes and error in Firefox

comment:2 Changed 9 years ago by bill

Similar to #10771 and #10792 but this is a mozilla problem, patch looks good to me.

comment:3 Changed 9 years ago by Becky Gibson

Resolution: fixed
Status: newclosed

(In [21769]) fixes #10957 - added try/catch in Moz section of isTabNavigable() and added dialog with iframe to test_Dialog.html.

comment:4 Changed 9 years ago by Adam Peller

(In [21770]) style fix, refs #10957

Note: See TracTickets for help on using tickets.