Support » Theme: Twenty Nineteen » No Touch & Hold Delay on Links

  • Resolved ravelixstudio

    (@ravelixstudio)


    When viewing the site from mobile, the links present on the site’s posts or pages open when touched during scrolling. There’s simply no touch and hold delay.

    Typically, there’s always a delay where the browser waits for a very short time to following the link when the user intends to scroll.

    This makes browsing the site very problematic on mobile. Tested on multiple smartphones from multiple browsers (Chrome, Firefox, Edge). Doesn’t anyhow happens on desktop though.

    Please advise how it can be fixed. We are comfortable with technical instructions.

    • This topic was modified 1 year, 1 month ago by ravelixstudio. Reason: Edited the tags

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Joy

    (@joyously)

    I just briefly looked at the touch-keyboard-navigation.js file, and it seems that the event listener for touchend is on the document, instead of the menu. Perhaps that is what is affecting all the links?

    ravelixstudio

    (@ravelixstudio)

    We went ahead and checked the js file you mentioned. The problem was in line number 222 where the browser is being told to follow the link on touchstart. We don’t know who would do such a thing, but commenting out the if statement fixed it. Thanks a lot for pointing out the file to look into!

    Here’s the description of the problem:

    Look inside the touchstart event listener at line number 216.

    It houses this following piece of code in it:

    // If there’s a link, go to it on touchend
        if ( '#' !== url && '' !== url ) {
           window.location = url;
        }

    This programmer has meticulously mentioned that the browser is supposed to follow the link on touchend but put the code for it in touchstart. Just commenting out window.location = url; solved the problem.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Correct. Fix will be available in the next release: https://core.trac.wordpress.org/ticket/45510

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No Touch & Hold Delay on Links’ is closed to new replies.