Opened 6 months ago

Closed 6 months ago

#22632 closed defect (bug) (fixed)

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

Reported by: TobiasBg Owned by: ryan
Priority: normal Milestone: 3.5
Component: Media Version: 3.5
Severity: normal Keywords: has-patch commit
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 6 months ago.
22632.2.diff (1.6 KB) - added by koopersmith 6 months ago.
Now with better spelling!

Download all attachments as: .zip

Change History (7)

  • Component changed from General to Media
  • Milestone changed from Awaiting Review to 3.5
  • 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.

comment:3 follow-up: ↓ 4   TobiasBg6 months ago

Confirmed, patch fixes the issue.

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

comment:4 in reply to: ↑ 3   koopersmith6 months ago

Replying to TobiasBg:

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

You are correct. Huh.

Now with better spelling!

  • 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.