Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#33458 closed defect (bug) (fixed)

wp.media.frame remains active on the second instance.

Reported by: llemurya's profile llemurya Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: major Version: 4.2.4
Component: Media Keywords: has-patch
Focuses: javascript Cc:

Description

I added in theme add_theme_support( 'post-thumbnails', array( 'post' ) ); in order to can set Featured Image.When I click on the Add Media button in the wp.media.frame is set the current frame, when I print in the console wp.media.frame.el.id,the result is "__wp-uploader-id-0".In the next step I click on the Featured Image button and in the wp.media.frame is set another instance of the frame, in the console the wp.media.frame.el.id gets "__wp-uploader-id-3", but when I click again on the Add Media button in the wp.media.frame remains the last frame and in the console is printed "__wp-uploader-id-3" instead of "__wp-uploader-id-0".

Attachments (1)

33458.diff (503 bytes) - added by wonderboymusic 10 years ago.

Download all attachments as: .zip

Change History (4)

#1 @llemurya
10 years ago

  • Severity changed from normal to major

#2 @wonderboymusic
10 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.4
  • Owner set to wonderboymusic
  • Status changed from new to assigned

#3 @wonderboymusic
10 years ago

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

In 34254:

Media JS: ensure that wp.media.frame (a static reference to the "current" Frame) is reset when a cached frame is opened.

Fixes #33458.

Note: See TracTickets for help on using tickets.