#8443 closed bug (fixed)
Dialog: "unspecified error" when using ie9 and iframe
Reported by: | mr-x-123 | Owned by: | mr-x-123 |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.4 |
Component: | ui.dialog | Version: | 1.8.21 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
hi folks, i'm sorry i'm in a hurry and writing a bad ticket. in fact i considered not writing a ticket at all, but it maybe it will help. to my humble knowledge the effects module is USELESS as-is in ie9 with a iframed page.
problem is: ie9.0.8112.16421 64bit (not ie8, not ie7, not ff, not chromium) gives "unspecified error" when calling
active = document.activeElement;
in line 4716 or so. this is most likely a ie9 bug.
you can read more at http://stackoverflow.com/questions/7904417/jquery-ui-creates-unspecified-error-when-loading-iframe-in-ie9 or just google. you will find if you are interested.
i "fixed" it by writing
try { active = document.activeElement; } catch( e ) { active = document.body; }
around this and the other occourence of document.activeElement;
please excuse if i can't provide additional information
Change History (19)
comment:1 Changed 11 years ago by
Owner: | set to mr-x-123 |
---|---|
Status: | new → pending |
comment:2 Changed 11 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:3 Changed 10 years ago by
I believe this is an issue in jquery core.
I have created ticket 13378 (http://bugs.jquery.com/ticket/13378) to track it there.
comment:5 Changed 10 years ago by
Component: | ui.effects.core → ui.dialog |
---|---|
Milestone: | 1.9.0 → none |
Resolution: | notabug |
Status: | closed → reopened |
Summary: | "unspecified error" when using ie9 and IFRAME → Dialog: "unspecified error" when using ie9 and iframe |
The error occurs on this line in open:
this.opener = $( this.document[0].activeElement );
Per the discussion in the core ticket the error occurs on access to activeElement
, therefore I believe our only recourse here it to wrap that line with a try/catch.
I verified that this problem does not occur in IE10.
comment:6 Changed 10 years ago by
Here's an approach that core took to deal with this problem: https://github.com/jquery/jquery/commit/85fc5878b3c6af73f42d61eedf73013e7faae408.
comment:8 Changed 9 years ago by
We implemented a workaround for this issue for draggable: https://github.com/jquery/jquery-ui/commit/eae2c4b358af3ebfae258abfe77eeace48fcefcb
We can probably apply the same solution here.
comment:9 follow-up: 10 Changed 9 years ago by
That commit also addresses the issue in #9420, which isn't a duplicate, but these two should be solved in one commit.
comment:10 Changed 9 years ago by
Replying to joern.zaefferer:
That commit also addresses the issue in #9420, which isn't a duplicate, but these two should be solved in one commit.
comment:11 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Dialog: Safe activeElement access.
Fixed #9420 - Dialog: Close causes blur of window in IE9 Fixed #8443 - Dialog: "unspecified error" when using ie9 and iframe
Changeset: 2dfe85d3e2269a571e07bd550bbd838ee703b833
comment:12 Changed 9 years ago by
Milestone: | none → 1.11.0 |
---|
comment:13 Changed 9 years ago by
Is it possible to apply this fix to the 1.8, 1.9 and 1.10 versions, too? I'm using the 1.8 version, and this issue is nagging me for a long time.
comment:14 Changed 9 years ago by
If there is a 1.10.4 release, this will almost certainly be included. If there is a 1.9.3 release, this might be included. There will definitely not be a 1.8.25 release.
comment:15 Changed 9 years ago by
Dialog: Safe activeElement access.
Fixed #9420 - Dialog: Close causes blur of window in IE9 Fixed #8443 - Dialog: "unspecified error" when using ie9 and iframe (cherry picked from commit 2dfe85d3e2269a571e07bd550bbd838ee703b833)
Changeset: 29e8077871902a49f3039633a7fb9ac5c4093aa8
comment:16 Changed 9 years ago by
Milestone: | 1.11.0 → 1.10.4 |
---|
comment:17 follow-up: 18 Changed 9 years ago by
Hi,
I came across this ticket when I was experiencing the same issue with IE 7 and IE 8 when a page was displaying a dialog widget when the page first loads. The page is being displayed in an iframe.
jquery-ui-1.10.4.custom.js
After debugging the issue I found the block of code that is causing the issue to be:
open: function() {
var that = this; if ( this._isOpen ) {
if ( this._moveToTop() ) {
this._focusTabbable();
} return;
}
this._isOpen = true; this.opener = $( this.document[0].activeElement );
this._size(); this._position(); this._createOverlay(); this._moveToTop( null, true ); this._show( this.uiDialog, this.options.show, function() {
that._focusTabbable(); that._trigger("focus");
});
this._trigger("open");
},
My guess here is that the following line needs the same modification that was done to fix the original posters issue:
this.opener = $( this.document[0].activeElement );
Please let me know when this will be resolved. I am going to try the workout the poster suggested, but I want to be sure that this won't cause me issues if we upgrade to any new versions of jQuery UI that will be released.
comment:18 Changed 9 years ago by
Replying to dmazz55:
Hi,
I came across this ticket when I was experiencing the same issue with IE 7 and IE 8 when a page was displaying a dialog widget when the page first loads. The page is being displayed in an iframe.
jquery-ui-1.10.4.custom.js
After debugging the issue I found the block of code that is causing the issue to be:
open: function() {
var that = this; if ( this._isOpen ) {
if ( this._moveToTop() ) {
this._focusTabbable();
} return;
}
this._isOpen = true; this.opener = $( this.document[0].activeElement );
this._size(); this._position(); this._createOverlay(); this._moveToTop( null, true ); this._show( this.uiDialog, this.options.show, function() {
that._focusTabbable(); that._trigger("focus");
});
this._trigger("open");
},
My guess here is that the following line needs the same modification that was done to fix the original posters issue:
this.opener = $( this.document[0].activeElement );
Please let me know when this will be resolved. I am going to try the workout the poster suggested, but I want to be sure that this won't cause me issues if we upgrade to any new versions of jQuery UI that will be released.
We need a reduced test case that shows how you're encountering this issue. I'm curious why we haven't noticed this before.
comment:19 Changed 9 years ago by
Hi,
I've updated my install to jqueryui version 1.10.4.
However, I'm having the same problem (en ie9, inside an iframe) in the dialog "dialog.open" method
As far as I see, the correction was only for the "dialog.close" method.
Problem still happens in line 232.
https://github.com/jquery/jquery-ui/blob/1-10-stable/ui/jquery.ui.dialog.js#L232
Sorry, but I can't post a "minimum example" right now.
Please provide a reduced test case showing the problem. I just did a quick test with animated dialogs and it worked fine.