------=_Part_20246857_85949410.1371647984315
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
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(a)redhat.com>
To: "Richard Hopper" <Richard.Hopper(a)netapp.com>
Cc: engine-devel(a)ovirt.org, "Christopher Morrissey"
<Christopher.Morrissey(a)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(a)netapp.com>
> To: "Vojtech Szocs" <vszocs(a)redhat.com>
> Cc: engine-devel(a)ovirt.org, "Christopher Morrissey"
> <Christopher.Morrissey(a)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(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel
------=_Part_20246857_85949410.1371647984315
Content-Type: application/x-compressed-tar; name=test-plugin.tar.gz
Content-Disposition: attachment; filename=test-plugin.tar.gz
Content-Transfer-Encoding: base64
H4sIAF2uwVEAA+2XXW/aMBSGuU1+hZeb0AnIN0gsRZraXeyiajV1mnZpEg/chjiKHSib+O+zE6cF
tI5JK91Hz3PjOD62j318XieCcNEvCWdVmRDudI6BKxmNoqYchjulpuP53tAN/OEo8DuuF0S+10HR
UbzZo+IClwh1lvwrS/jjdofa/1HEbvzVZojBXCyyJ5xDBXgYho/F33OD4X38/ZEn4x9FodtB7hP6
8CgvPP7xq/PLs+vPV++QCvrEjNuC4HQSO3VhxlOWrmXBk5IWAol1QU5tQe6Ec4OXuHlrT0zTWMqt
xAVFp6jAJcnFoMiqGc3fFrRrq5Nmn7yRVtJiwApBWc6730zDwFnGViS9IJzjGbksqezCx8h+bZvG
5r5HSWaUC1LKLrLPR/o+p2KMvlR5okbqniA1VG3J52x1TnHGZl37Ws6KmordQ7UT/VRXlb1hOysy
xemC5g8PjdeOMnYa437CcqEWpLan7Rm6bnGnRg3qB+mpYWx6yju9lA8kIXRJ0i03UyxwDzXp9onm
KVtpx/mKimSOagP9ykgwJ8g+yxgnF2u9iHHdUq8zUQ3tQrdXVnsimZYE39bPG+WaubudOF13VTV2
mghO1KOOtNMcgz99OoFjs6f/Pzjtvz/HAf13w3C0pf+B1H/5FeCB/j8HP9X/X1D8VtjQthg1+rWq
5W3Q3gSMCy2L3T1J6ympV5q12RajvcvHjIuJWat5c0aRPqPSrtCtMc2LSjtrTSshWG6hJc4qWa1n
1BeBhVieZDS5PbV2vLaQM2mHeylCqPJ/cMNZfsQ5DuW/F4U6/10/8kYy//1A/i5A/j8DMlGtHC+I
NUaWOguW/LaxqjJT9QNfRg//CnWn9hK5wmLejvZws1jm5v9NIgAAAAAAAAAAAAAAAAAAAAAAgL+I
733qUgIAKAAA
------=_Part_20246857_85949410.1371647984315--