WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#17329 closed defect (bug) (fixed)

Inline media uploader broken

Reported by: greuben Owned by: azaozz
Milestone: 3.2 Priority: normal
Severity: major Version:
Component: General Keywords: needs-testing
Focuses: Cc:

Description

Using FF4, on add new posts screen click on "Add an image" meida button, the "select files" button is missing and there's a javascript error.

c.defaultView.getComputedStyle(a, null) is null

The button appears if I reload the media uploader iframe

Attachments (2)

17329.diff (863 bytes) - added by greuben 3 years ago.
17329.2.diff (3.2 KB) - added by greuben 3 years ago.

Download all attachments as: .zip

Change History (13)

comment:2 follow-up: azaozz3 years ago

If we init the JS later, perhaps at body.onload instead of document.ready, would it bypass that bug?

greuben3 years ago

comment:3 in reply to: ↑ 2 greuben3 years ago

Replying to azaozz:

If we init the JS later, perhaps at body.onload instead of document.ready, would it bypass that bug?

Tried it, no change.

A silly hack to bypass this bug would be changing display: none to visibility: hidden. See 17329.diff

comment:4 nacin3 years ago

  • Milestone changed from Awaiting Review to 3.2

comment:5 greuben3 years ago

This js error is fixed in jQuery 1.6.1rc1 but the "Select files" button is still not displayed with jQuery 1.6.1rc1

Version 0, edited 3 years ago by greuben (next)

comment:6 follow-up: azaozz3 years ago

Seems fixed in FF 4.0.1, all thickbox popups with iframes work properly even with jQuery 1.5.2.

Last edited 3 years ago by azaozz (previous) (diff)

comment:7 in reply to: ↑ 6 greuben3 years ago

Replying to azaozz:

Seems fixed in FF 4.0.1, all thickbox popups with iframes work properly even with jQuery 1.5.2.

I'm using FF 4.0.1(Ubuntu), the problem still exists.

comment:8 johnbillion3 years ago

Confirming this error occurs in Firefox 4.0 on Win7.

greuben3 years ago

comment:9 greuben3 years ago

  • Keywords needs-testing added

A little less creepy hack is to use negative offsets instead of display: none. See 17329.2.diff

comment:10 azaozz3 years ago

Think the reason for this happening is that the swfobject DOM ready event fires before the jQuery one. Tried adding some delay in swfupload.swfobject.js that seems to fix this.

comment:11 azaozz3 years ago

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

In [18073]:

Add some delay to allow the flash uploader swf to load in FF4, fixes #17329

Note: See TracTickets for help on using tickets.