Android fastclick issue

时间秒杀一切 提交于 2019-12-10 12:26:20

问题


I have two different pages with a clickable element located on the same position. On the first page there is a menu button which will open up if a user clicks on it and on the second one, in the exact same position there is a back button which will redirect the user to the first page.

Now to the problem; whenever a user clicks the back button on the second page he will be redirected to the first page which is intended, but it will also open up the menu automatically which it shouldn't do.

I am building an app with PhoneGap where i am utilizing the fastclick library in order to eliminate the 300ms click delay. If the fastclick library isn't used, the application works as expected but then it wont feel as responsive.

The fastclick library works perfectly under iOS environment.

What could be causing this undesirable effect?


回答1:


I think the problem is more because the click on loaded on a mouse event and not a touch event that you are experiencing this issue. Can you try loading the event handler on a touch event instead ?



来源:https://stackoverflow.com/questions/25013099/android-fastclick-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!