Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#22632 closed defect (bug) (fixed)

media.view.MediaFrame.restoreThickbox() not called in all cases

Reported by: tobiasbg's profile TobiasBg Owned by: ryan's profile ryan
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch commit
Focuses: Cc:

Description

media.view.MediaFrame.restoreThickbox() is not called (and thus window.tbRemove() is not restored), when the new Media Manager is just closed (by clicking on the X or the gray border area). It is only called when the Media Manager is closed when something is inserted into the editor (e.g. "Insert into Post").

This breaks the closing behavior of other Thickboxes on the page, as tbRemove() is then not available.

Attachments (2)

22632.diff (1.6 KB) - added by koopersmith 13 years ago.
22632.2.diff (1.6 KB) - added by koopersmith 13 years ago.
Now with better spelling!

Download all attachments as: .zip

Change History (7)

#1 @nacin
13 years ago

  • Component changed from General to Media
  • Milestone changed from Awaiting Review to 3.5

@koopersmith
13 years ago

#2 @koopersmith
13 years ago

  • Keywords has-patch commit added

Patch ensures modal events are always fired on its frame.

Easist way to test this is to open the modal, type tb_remove in a Webkit console (where it will display the source), close the modal, and type tb_remove again (or if you're feeling frisky, set them to variables and run an equality test). Did they output the same thing? No? Good.

#3 follow-up: @TobiasBg
13 years ago

Confirmed, patch fixes the issue.

Note: The verb is "to propagate", I think.

#4 in reply to: ↑ 3 @koopersmith
13 years ago

Replying to TobiasBg:

Note: The verb is "to propagate", I think.

You are correct. Huh.

@koopersmith
13 years ago

Now with better spelling!

#5 @ryan
13 years ago

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

In 22938:

In the media modal, ensure modal events are always fired on its frame. This ensures restoreThickbox() and thus tbRemove() are called properly when clicking the close button of the modal.

Props koopersmith
fixes #22632

Note: See TracTickets for help on using tickets.