• Resolved thisiswilliam

    (@thisiswilliam)


    Hi, I am using WordPress script which allows me to reply to comments without refreshing the current page, so it is great, but a problem that I have faced with it in many situations is when I am with my phone this device has a touchscreen and the problem is in this what I know: the script has addeventlistener on touchstart!
    It is not safe for users.
    Think about this, a user is scrolling to see more comments and unfortunately touch this reply link, so it starts showing a reply box which is really annoying during that situation.
    I suppose it will be solved if I delete them by myself and use my customized script but I wanna know we have another way for disabling touchstart events for replying to comments or no.
    Thanks a lot.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You can use .removeEventListener() from your own script which runs after the listener has been added. Perhaps this is what you meant when you said “delete them by myself”. You could use .preventDefault() but that would also disable the mouse click event, so your script would have to manage user interaction through its own means. Or you could alter the original script and comment out the initial addEventListener(). I don’t see any other options.

Viewing 1 replies (of 1 total)

The topic ‘WordPress reply comment script for touchscreens’ is closed to new replies.