[wp-trac] [WordPress Trac] #47545: Getting undefined wp.media.frame.state() after click on featured image preview

WordPress Trac noreply at wordpress.org
Sat Jun 15 13:29:15 UTC 2019


#47545: Getting undefined wp.media.frame.state() after click on featured image
preview
--------------------------+-----------------------------
 Reporter:  nlemsieh      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.2.1
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 In WP 5.x:
 - When I click on the featured image preview the
 wp.media.frame.state().get('selection') is undefined.
 - But, when I click on the "Replace image" button
 wp.media.frame.state().get('selection') returns the selected attachment
 object (which is the expected behaviour).

 While in WP 4.x it returns correctly the attachment when I click on the
 featured image preview.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47545>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list