[wp-trac] [WordPress Trac] #50105: Remove infinite scrolling behavior from the Media grid

WordPress Trac noreply at wordpress.org
Sun Jun 6 18:19:09 UTC 2021


#50105: Remove infinite scrolling behavior from the Media grid
-------------------------------------+-------------------------------------
 Reporter:  afercia                  |       Owner:  joedolson
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  5.8
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-screenshots needs-   |     Focuses:  ui, accessibility,
  dev-note 2nd-opinion               |  javascript
-------------------------------------+-------------------------------------

Comment (by joedolson):

 OK. Here's what I'm seeing, I think.

 The Media library overrides backbone.sync in `media\models\query.js`.

 Backbone uses .fetch to get data using .sync, so this is overriding the
 default Backbone return value, using `wp.media.ajax` instead.
 `wp.media.ajax` (an alias of `wp.ajax.send`) doesn't return an XHR object,
 but instead returns a promise.

 We could probably pass an option into `wp.media.ajax` that gets the XHR
 object, though I'm not at all sure what additional consequences that could
 have.

 In my quick test, I was able to get an XHR object, but I didn't see the
 header showing up, but I ran out of time today to try to track down why.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50105#comment:98>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list