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:
http://aubrey.pw/d/2017/ENRB5gAwPI.gif
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:
http://aubrey.pw/d/2017/69kAlmD23J.gif
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:
http://aubrey.pw/d/2017/zA5SEE23nr.png
But in your plugin, for some reason, the shim is outside of the upload area:
http://aubrey.pw/d/2017/VSmK4ekv5o.png
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:
http://aubrey.pw/d/2017/lFYAiy20OQ.gif
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)?
Hi Aubrey,
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
BrajeshYes, you will get a notification. I hoping to do it this weekend. Once I push the release, will post back here.
Thank you for the patience.
Regards
BrajeshHi Alex,
I am sorry but there has not been much done on it. I will work on it today/tomorrow and push an update.Thank you
BrajeshThank 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.
Here is the fix.
https://github.com/buddydev/mediapress/commit/ea9b4b013b8aac8475c47598a55e74300ad264ecAlso, I have pushed 1.3.5 on wp.org, Please use it.
Thank you for the patience and help on this.
Regards
BrajeshMarking it as resolved. Please feel free to reopen in case there is any issue.
You must be logged in to reply to this topic.