BuddyDev

Search

[Resolved] [BUG] Uploading on Mobile not working (HTML5 Shim Not Working?)

  • Participant
    Level: Initiated
    Posts: 1
    Aubrey on #12041

    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)?

  • Keymaster
    (BuddyDev Team)
    Posts: 21035
    Brajesh Singh on #12049

    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
    Brajesh

  • Participant
    Level: Initiated
    Posts: 1
    Aubrey on #12158

    I’m assuming when there’s an update, this post might get updated. But in the case that it might not, I thought I’d check in on a solution? No rush, just checking for our client.

  • Keymaster
    (BuddyDev Team)
    Posts: 21035
    Brajesh Singh on #12165

    Yes, 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
    Brajesh

  • Participant
    Level: Initiated
    Posts: 1
    Alex on #13950

    I’m also reporting this finding… it’s a pretty serious issue – as it makes the plugin pretty unusable on mobile.

    I se that that this thread was started four months ago… are there any updates?

    Thanks you!

  • Keymaster
    (BuddyDev Team)
    Posts: 21035
    Brajesh Singh on #13963

    Hi 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
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 21035
    Brajesh Singh on #14070

    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.

    Here is the fix.
    https://github.com/buddydev/mediapress/commit/ea9b4b013b8aac8475c47598a55e74300ad264ec

    Also, I have pushed 1.3.5 on wp.org, Please use it.

    Thank you for the patience and help on this.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 21035
    Brajesh Singh on #14174

    Marking it as resolved. Please feel free to reopen in case there is any issue.

You must be logged in to reply to this topic.

This topic is: resolved