Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This issue seems related to #1503340: Stuck in overlay after upload, no way to close modal dialog in that the media item upload stalls on the upload success message.
https://skitch.com/jesse.beach/85sy1/windows-7-32-ie-9-native-running
In the error we encountered, Internet Explorer is choking on the this
reference to the object that triggered the iframe load event, namely the iframe. this
doesn't refer to the iframe.
Drupal.media.popups.mediaBrowser.mediaBrowserOnLoad = function (e) {
var options = e.data;
if (this.contentWindow.Drupal.media.browser.selectedMedia.length > 0) {
var ok = $(this).dialog('option', 'buttons')['OK'];
ok.call(this);
return;
}
};
Comment | File | Size | Author |
---|---|---|---|
#8 | media-n1595194-8.patch | 2.3 KB | DamienMcKenna |
#6 | media-n1595194-6.patch | 2.3 KB | DamienMcKenna |
#5 | media-n1595194-5.patch | 2.3 KB | DamienMcKenna |
#2 | 1595194_media_ie-image-upload-error_2.patch | 2.28 KB | katbailey |
#1 | 1595194_media_ie-image-upload-error_1.patch | 2.34 KB | jessebeach |
Comments
Comment #1
jessebeach CreditAttribution: jessebeach commentedInstead of using
this
to refer to the iframe that triggered the load event, I changed the reference to the target of the event object. From thesrcElement
property on the event object, IE correctly gets a reference to the iframe from which we can further reference thecontentWindow
and its properties.Also, the
onload
property can't be directly manipulated in IE. TheattachEvent
method of the iframe element must be invoked in order for the assigned load handling function to fire in a timely manner (i.e. in less than 10 seconds!). So I replaced code that binds the iframe onLoad handler to the load event. Instead, the attachEvent method is used if the method exists on the iframe element (in IE), and use onload property of the iframe otherwise.Comment #2
katbailey CreditAttribution: katbailey commentedNeeded a version of this that would apply on top of #1364640: Upload popup window doesn't work with translated interface ;-)
Also, setting the status to "needs review"...
Comment #4
katbailey CreditAttribution: katbailey commented*facepalm*
Comment #5
DamienMcKennaRerolled for v7.x-2.x.
Comment #6
DamienMcKennaOops, there was an errant plus symbol in the last patch.
Comment #7
DamienMcKennaThe patch doesn't work with the latest v2, it rolls up the popup to a ~20px-tall bar after the image uploads so you can't see the form to finish the upload process.
Comment #8
DamienMcKennaThis version at least fixes a typo in a comment, I can do that much =)
Comment #8.0
DamienMcKennaCorrected an issue reference tag.
Comment #9
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedso does #8 fix #7 issue?
Comment #10
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 6 year old patch in #8 to media.popups.js does not apply to the latest media 7.x-2.x-dev and if still relevant needs to be rerolled.
Comment #11
DamienMcKennaOTOH does anyone still care about IE 9?
Comment #12
joseph.olstadNOPE :\