Support » Plugin: AddToAny Share Buttons » AddToAny buttons not working on mobile

  • Resolved hdeprada

    (@hdeprada)



    I have used AddToAny buttons on several websites and I have never had any trouble with them. However, in my last project, I am having an important issue that I can’t figure out.

    The sharing buttons work perfectly on the desktop version of the site but on mobile when I click on them they redirect me to http://www.myurl.com/#twitter in the case of the twitter share button.

    This is a post page where you can see the problem https://honeststrategy.com/a/

    Could you please check it out?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author micropat

    (@micropat)

    The first inline script on the site is breaking event handlers:

    <script type="text/javascript">
    var originalAddEventListener, oldWidth;
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
    originalAddEventListener = EventTarget.prototype.addEventListener;
    oldWidth = window.innerWidth;
    EventTarget.prototype.addEventListener = function (eventName, eventHandler) {
    originalAddEventListener.call(this, eventName, function (event) {
    if (event.type === "resize" && oldWidth === window.innerWidth) {
    return;
    }
    else if (event.type === "resize" && oldWidth !== window.innerWidth) {
    oldWidth = window.innerWidth;
    }
    eventHandler(event);
    });
    };
    }
    </script>
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.