[wp-trac] [WordPress Trac] #50410: Media grid: hiding the "contextually created attachments" breaks the collection length count
WordPress Trac
noreply at wordpress.org
Wed Jun 17 14:31:05 UTC 2020
#50410: Media grid: hiding the "contextually created attachments" breaks the
collection length count
-----------------------------+----------------------------------------
Reporter: afercia | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.5
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-screenshots | Focuses: accessibility, javascript
-----------------------------+----------------------------------------
Changes (by afercia):
* keywords: => has-screenshots
Comment:
Some more context.
Given the media grid fetches new attachments depending on the viewport
height and scroll position, on medium / large screens it usually fetches
at least twice. This makes spotting the issue not that easy. To reproduce,
open your browser's dev tools and make the viewport height as small as
possible. See screenshot below. Then:
- to to the Media Library page in "grid mode"
- check there was only one AJAX request to fetch attachments
- select the grid unordered list element and get the `li` items count in
your console
- in my case (see screenshot below) I had 3 attachments coming from
"cropped" images
- the grid displays only 37 items
- expected: 40 items
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50410#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list