WordPress.org

Make WordPress Core

Opened 2 weeks ago

Last modified 2 weeks ago

#48361 new defect (bug)

Select Files on iOS doesn't trigger on modal if start on Upload Files tab and switch to Media Library tab

Reported by: garrett-eclipse Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: ui, javascript, administration Cc:
PR Number:

Description

Hello,

I came across an odd issues on a client site recently using ACF and the Gallery field so I did a fresh install and found the issue resides in core as well.

In short the 'Select Files' button doesn't trigger the uploader if you trigger the media modal starting on 'Upload Files' and then switching to 'Media Library' when there's no files present.

To reproduce use an iOS device (iPad/iPhone);

  1. Install a clean WordPress
  2. Create a new post.
  3. Add a Gallery block
  4. Click the 'Media Library' button.
  5. If your Media Modal opens with 'Media Library' tab selected then switch to 'Upload Files' and reload the screen.
  6. Your Media Modal should open on 'Upload Files' now.
  7. Switch to the Media Library tab now.
  8. Click the 'Select Files' button that appears below the 'No items found' text.
  9. Note the uploader isn't triggered.

This seems to only occur when there's no items in your media library and you are using the Media Modal but your settings have it open on 'Upload Files' first and then you switch to 'Media Library'.

I initially came across this with an ACF Gallery field, but in my clean install it was the Gallery block that I was able to reproduce the issue with.

All the best,
Cheers

Attachments (1)

bb5a755b9ba2ba68837dc9c983499900.gif (594.9 KB) - added by garrett-eclipse 2 weeks ago.
Illustrating the issue, starting on 'Upload Files' I go to 'Media Library' and click 'Select Files' with no result, then I switch back to 'Upload Files' and come back to 'Media Library' to find clicking 'Select Files' now triggers the uploader.

Download all attachments as: .zip

Change History (3)

@garrett-eclipse
2 weeks ago

Illustrating the issue, starting on 'Upload Files' I go to 'Media Library' and click 'Select Files' with no result, then I switch back to 'Upload Files' and come back to 'Media Library' to find clicking 'Select Files' now triggers the uploader.

#1 @adamsilverstein
2 weeks ago

Hi @garrett-eclipse thanks for the detailed bug report. I have some questions:

  • Can you confirm you are testing with WordPress version 5.2? or trunk?
  • Are you testing in an emulator, chrome debugger, or an actual device?
  • Since you reported this as iOS specific I am assuming this doesn't happen on desktop, is that correct?

#2 @garrett-eclipse
2 weeks ago

Hi @adamsilverstein

I was testing with WP 5.2.4 / PHP 7.2.9 but just spun up an instance of trunk to confirm the issue is still present, and it is.

The issue was originally flagged to me on a physical iPad and then again on iPhone with our dev site, for reproducing on trunk and latest though I used the emulator for both iPad and iPhone. I haven't tried in chrome debugger and in safari debugger I can't spot anything odd it's just like the trigger wasn't attached.

And yes that's correct I've tried to reproduce in Chrome/Firefox/Safari with no luck.

Appreciate you looking into this.

Note: See TracTickets for help on using tickets.