[Engine-devel] IE9 Issue with UI Plugin
Vojtech Szocs
vszocs at redhat.com
Wed Jun 19 13:19:44 UTC 2013
Hi Ricky,
you were right, in IE9, postMessage listener (WebAdmin) didn't work properly, so I simplified it and verified that it now works in IE9, too: http://gerrit.ovirt.org/#/c/15888/
After applying above mentioned patch, everything should work as expected in IE9. I've also attached "test-plugin" which I used for verification in IE9.
Regards,
Vojtech
----- Original Message -----
> From: "Vojtech Szocs" <vszocs at redhat.com>
> To: "Richard Hopper" <Richard.Hopper at netapp.com>
> Cc: engine-devel at ovirt.org, "Christopher Morrissey" <Christopher.Morrissey at netapp.com>
> Sent: Wednesday, June 19, 2013 11:54:16 AM
> Subject: Re: [Engine-devel] IE9 Issue with UI Plugin
>
> Hi Ricky,
>
> code running in the iframe (custom dialog content) can close the dialog in
> the following way:
>
> 1, send message to your plugin to indicate the dialog needs to be closed:
>
> parent.postMessage('CloseMyDialog', '*');
>
> 2, your plugin intercepts the message via MessageReceived function and closes
> the dialog:
>
> MessageReceived: function(data, sourceWindow) {
> switch (data) {
> case 'CloseMyDialog':
> window.alert('About to close dialog');
> api.closeDialog('my-dialog');
> break;
> }
> }
>
> If the above doesn't work for you, it could mean that:
> - MessageReceived function isn't invoked - make sure to have [*] before
> api.register() call
> - api.closeDialog() function isn't working - in this case I need to fix it
> for IE9
>
> [*] accept message events from iframe (custom dialog content) origin
>
> api.options({
> allowedMessageOrigins: 'http://nicedomain:8080'
> /* OR */
> allowedMessageOrigins: ['http://nicedomain1:123',
> 'https://nicedomain2:345']
> });
>
> I'm going to investigate this issue on IE9 myself to see if the above code is
> really working there.
>
> Vojtech
>
>
> ----- Original Message -----
> > From: "Richard Hopper" <Richard.Hopper at netapp.com>
> > To: "Vojtech Szocs" <vszocs at redhat.com>
> > Cc: engine-devel at ovirt.org, "Christopher Morrissey"
> > <Christopher.Morrissey at netapp.com>
> > Sent: Monday, June 17, 2013 8:16:03 PM
> > Subject: IE9 Issue with UI Plugin
> >
> > Hi Vojtech,
> >
> > I had previously sent you an email about IE9 compatibility where the
> > problem
> > we were having was solved by omitting console logging when a console was
> > unavailable (i.e. IE). However, it is looking like IE9 may have a bigger
> > issue with regards to the plugin framework.
> >
> > Now that we have gotten dialogs to open via dynamically inserted buttons
> > within RHEV tabs (for example, a NetApp button in the Storage tab), we can
> > go through our whole process with the exception of closing the window. In
> > all other browsers, our dialog will close as expected, but in IE the window
> > remains open. It can be closed by hitting the red "x" in the corner, but it
> > appears the code in the frame itself cannot close the window, with a
> > console
> > message in the dev tools of IE9 showing an error of "'Math' is undefined".
> > I've read up on this, and it seems like this is a very widespread error in
> > Internet Explorer concerning the manner/order in which iframes are
> > dynamically inserted.
> >
> > I've copied engine-devel in case anyone has similar issues/solutions, but
> > it
> > seems as though we need some sort of clause in the plugin framework for IE
> > when it comes to dynamic insertion of new windows.
> >
> > - Ricky Hopper
> >
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-plugin.tar.gz
Type: application/x-compressed-tar
Size: 693 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20130619/3212eaaf/attachment-0001.bin>
More information about the Devel
mailing list