Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#6660 closed defect (bug) (fixed)

Media uploader: Insert Into Post fails in IE6

Reported by: tellyworth Owned by:
Milestone: 2.5.1 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords:
Focuses: Cc:


The Insert Into Post buttons in the media uploader don't work correctly in IE6 when more than one image is displayed. This is most obvious on the Media Library tab but I believe it affects the gallery and upload tabs also when multiple images are listed there.

  1. Make sure several images are in the media library
  1. New Post, Add Image, click to the Media Library tab
  1. Click the Show button to expand the second image in the list (or any image except the first)
  1. Click Insert Into Post

Expected: the expanded image is inserted into the post

Actual: the first image in the list is inserted into the post instead.

Attachments (1)

insert-into-post-button-ie6-r7638.patch (813 bytes) - added by tellyworth 10 years ago.

Download all attachments as: .zip

Change History (4)

#1 @tellyworth
10 years ago

The problem is caused by IE's poor handling of the 'button' tag. The Media Library list is a single form with multiple buttons. IE submits all buttons on the form regardless of which one was clicked. The handler code doesn't notice this and thinks the first button in the list has been clicked.

The enclosed patch fixes it by swapping the button tag to an input type="submit".

nb, there are a few other button tags in new code that might suffer from similar problems, I haven't checked them yet.

#2 @ryan
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7655]) Use input instead of button to work around IE6 bug. Props tellyworth. fixes #6660 for trunk

#3 @ryan
10 years ago

(In [7656]) Use input instead of button to work around IE6 bug. Props tellyworth. fixes #6660 for 2.5

Note: See TracTickets for help on using tickets.