#6660 closed defect (bug) (fixed)
Media uploader: Insert Into Post fails in IE6
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.5.1 | Priority: | normal |
| Severity: | normal | Version: | 2.5 |
| Component: | General | Keywords: | |
| Focuses: | Cc: |
Description
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.
- Make sure several images are in the media library
- New Post, Add Image, click to the Media Library tab
- Click the Show button to expand the second image in the list (or any image except the first)
- 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)
Note: See
TracTickets for help on using
tickets.
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.