We currently are working on a site that uses MediaPress and we’ve ran into this issue:
On mobile, to upload a file, you have to click the upload button “twice.” See below gif of what is going on:
As you can see in the gif, I had to click “three times” to get the dropup to show.
Based on our findings we’ve determined this has to do with the “Shim” WP Media Uploader uses being improperly positioned on mobile. Below you’ll see how and where the SHIM is used on the normal WP Uploader:
As you can see, WP drops a “shim” element on the page that is precisely position over the upload input. Why, we don’t know ¯\_(ツ)_/¯, but that’s the way it is done in the WP-admin. The important thing here is that in the WP Admin, the shim is placed, relatively, in the upload box, which ensures it is positioned correctly:
But in your plugin, for some reason, the shim is outside of the upload area:
As you can see, the shim is outside relative to the body. What this means is that the shim is out of position when the page is loaded, but when the upload button is clicked (not the shim), it suddenly gets positioned right above the upload button, then the second time it’s clicked, it works:
This has caused us to have to tell the client it just works that way with MediaPress, but we thought we’d report it to you so you know it’s happening. This does not seem like normal functionality, but since we saw it on your demo we thought it must be something going on with how MediaPress creates the uploader, maybe an issue with a newer version of WP (we’re using 4.9.1 right now)?
Thank you for posting.
I sincerely appreciate you taking time to help me understand it properly. I do see the issue clearly now. Please allow me to explore further this week(Sorry about this, just to need to set aside some time for this).
Thank you both of you. Specially Aubrey for the details.
It is fixed in 1.3.5
The problem was related to the way we are doing it on activity. On the page load, the Dropzone is hidden, so the shim was positioning incorrectly.
To fix it, I had to refresh the uploader after the drozone becomes visible and that fix it.
Also, I have pushed 1.3.5 on wp.org, Please use it.
Thank you for the patience and help on this.
You must be logged in to reply to this topic.