Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#33458 closed defect (bug) (fixed)

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

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

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 11 years ago.

Download all attachments as: .zip

Change History (4)

#1 @llemurya
11 years ago

  • Severity normal → major

#2 @wonderboymusic
11 years ago

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

#3 @wonderboymusic
11 years ago

  • Resolution → fixed
  • Status assigned → 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.