WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 7 months ago

#22504 closed defect (bug) (fixed)

Custom Header should reuse existing media frame

Reported by: duck_ Owned by: koopersmith
Priority: normal Milestone: 3.5
Component: Media Version:
Severity: normal Keywords: has-patch
Cc:

Description

Unlike custom-background.js, custom-header.js doesn't attempt to reuse an existing media frame. See [22502] and [22505].

This causes strange behaviour when closing and re-opening the media modal, e.g.

  1. Click "Choose Image"
  2. Close the modal
  3. Click "Choose Image"
  4. Attempt to go to the "Upload Files" tab

Expected: go to upload files

Actual: file browser opens because a new uploader instance was created with no left/bottom positioning CSS and blocks the link text

(NB: this missing CSS when multiple uploaders are created sounds like a potential issue elsewhere too)

Attachments (1)

22504.diff (410 bytes) - added by duck_ 7 months ago.

Download all attachments as: .zip

Change History (4)

duck_7 months ago

comment:1 koopersmith7 months ago

  • Owner set to koopersmith
  • Status changed from new to accepted

comment:2 duck_7 months ago

Potentially the cause of #22460

comment:3 koopersmith7 months ago

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

In 22791:

Media: Refresh the window-wide uploader whenever a state is activated. Properly unbind controller events. fixes #22504, see #21390.

Note: See TracTickets for help on using tickets.