Opened 6 months ago
Last modified 6 months ago
#22446 closed defect (bug)
Insert Media modal: IE 7, 8, and 9 issues — at Version 28
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Media | Version: | 3.5 |
| Severity: | normal | Keywords: | audit has-patch commit |
| Cc: |
Description (last modified by ocean90)
The vertical line on the left is displayed in IE 9, but not in IE 8 (see 22446.ie8.png, 22446.ie9.png).[22610]
"Drop files anywhere to upload" shouldn't be displayed in IE 7/8/9, as it doesn't support drag-and-drop (at least it doesn't on wp-admin/media-new.php).[22609]
- IE 7 needs some attention for the gallery view, see 22446.ie7_gallery.png
- IE 7 doesn't display the selected images (22446.ie7_selected_images.png) and in IE 9 you can see the second line (22446.ie9_selected_images.png)
In IE 7 and IE 8 you can't see which image is currently selected (blue border is missing), see 22446.ie8_selected_image.png.The check mark has been improved. Should be enough.
- In IE 7 Embed from URL doesn't work. Nothing happens after inserting an URL.
When uploading an image in IE 7 ( and IE 8?) a pop up comes up which wants to download admin-ajax.php. The file includes the JSON respond.[22845]
IE 8: Upload an image, switch to media library, try to change the filter dropdown. It will open the upload dialog.[22781]
- IE 8, 9, 10: Non-image thumbnails are quite off, see 22446.ie9.selected-music.png or 22446.ie9.selected-music2.png.
Change History (39)
SergeyBiryukov — 6 months ago
SergeyBiryukov — 6 months ago
- Description modified (diff)
- Summary changed from Insert Media modal looks odd in IE 8 to Insert Media modal: IE 7, 8, and 9 issues
comment:2
SergeyBiryukov — 6 months ago
- Description modified (diff)
- Keywords needs-patch added
- Owner set to ocean90
- Status changed from new to accepted
comment:7
koopersmith — 6 months ago
In 22609:
comment:8
koopersmith — 6 months ago
In 22610:
comment:10
koopersmith — 6 months ago
In 22611:
comment:11
koopersmith — 6 months ago
In 22612:
comment:12
ocean90 — 6 months ago
- Description modified (diff)
comment:13
ocean90 — 6 months ago
- Description modified (diff)
comment:14
ocean90 — 6 months ago
- Description modified (diff)
comment:15
nacin — 6 months ago
Priority 1: IE9 and IE8.
Priority 10: IE7. If we just hide this feature for IE7, I won't complain. We need to spend time on making sure that IE9 and IE8 work. Until they have no bugs, IE7 shouldn't be touched.
comment:16
lessbloat — 6 months ago
In IE8 When I upload an image (by clicking "Select files"), I see the following: http://cl.ly/image/2X392f3O2c3l (tested locally and on my MediaTemple server).
comment:17
ocean90 — 6 months ago
- Description modified (diff)
comment:18
follow-up:
↓ 20
lessbloat — 6 months ago
RE: comment:16:
MarkJaquith got on Skype and helped me figure out a fix for this. In wp-includes/functions.php line 2276 if you replace:
@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
with:
@header( 'Content-Type: text/html;' );
The issue is resolved for me. Can we do this conditionally for IE7 & IE8?
comment:19
nacin — 6 months ago
I forgot about this. Older versions of IE don't like application/json and should instead receive text/plain (I think, over text/html). Not sure if there are workarounds beyond browser detection or always serving text/*.
I seem to recall there being an explicit JS-based, koop-ordered reason for delivering application/json instead of text/html here. He will know if text/plain would be okay instead.
comment:20
in reply to:
↑ 18
azaozz — 6 months ago
Replying to lessbloat:
... Can we do this conditionally for IE7 & IE8?
Not just IE7 and 8, IE9 doesn't understand application/json either.
comment:21
follow-up:
↓ 22
koopersmith — 6 months ago
We're using application/json so jQuery's ajax method automatically parses the JSON. It also accepts text/javascript, which sounds like a viable IE fallback. I'd like to see a patch that sniffs for IE and replies with text/javascript instead.
If that doesn't work, we can overload it client-side to make sure that takes place, but then our shiny new ajax functions lose a bit of their luster.
comment:22
in reply to:
↑ 21
;
follow-up:
↓ 23
azaozz — 6 months ago
Replying to koopersmith:
I'd like to see a patch that sniffs for IE and replies with text/javascript instead.
Unfortunately IE doesn't recognize text/javascript either. Only text/html.
Would that patch be:
if ( $is_IE ) @header( 'Content-Type: text/html;' ); else @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
comment:23
in reply to:
↑ 22
lessbloat — 6 months ago
Replying to azaozz:
Would that patch be:
if ( $is_IE ) @header( 'Content-Type: text/html;' ); else @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
$is_IE didn't appear to be set (or accessible), I borrowed most of your code for 22446-download-ajax.diff which fixes this issue for me in IE8.
Note: IE7 continues to output errors when attempting to upload an image. Could be issues in addition to the Content-Type declaration.
comment:24
koopersmith — 6 months ago
The fact that all of the other XHR requests are performing correctly means that jQuery is handling the current code correctly — the error here is with plupload. And understandably so, as it is juggling numerous transports.
Instead of using the new wp_send_json_* methods (which we already had to manually parse), we should just use the traditional method of echoing some json and calling wp_die() in wp_ajax_upload_attachment().
Attaching a patch to do just that.
koopersmith — 6 months ago
comment:25
lessbloat — 6 months ago
+1 to 22446.upload.diff. Works for me in IE7 and IE8.
comment:26
azaozz — 6 months ago
+1 to commit 22446.upload.diff, works here too.
comment:27
nacin — 6 months ago
In 22845:
comment:28
ocean90 — 6 months ago
- Description modified (diff)

The missing borders around the images are a result of the use of box-shadow, which IE 7 and 8 doesn't support. I think we should try to use real CSS borders here.