#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)
Change History (5)
Changed 11 years ago by
Attachment: | 10957.patch added |
---|
comment:1 Changed 11 years ago by
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 11 years ago by
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Similar to #10771 and #10792 but this is a mozilla problem, patch looks good to me.