N
N
Nick Nesterov2015-12-12 04:17:55
css
Nick Nesterov, 2015-12-12 04:17:55

How to improve links in a mobile browser?

<a href="..."></a>
Links are processed only after a long press on them. I think it's a bad user story to force users to pinch links if they're used to tapping on them.
Angular offers the following solution:


A more powerful replacement for the default ngClick designed to be used on touchscreen devices. Most mobile browsers wait about 300ms after a tap-and-release before sending the click event. This version handles them immediately, and then prevents the following click event from propagating.

But I don't want to redo the whole project. And everywhere instead of href="..." write ng-click(...). There must be an adequate solution for this problem. Who knows? Who faced?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nicholas, 2015-12-12
@njnesterov

You can pervert a little and write a directive that will hang touchstart on the block. Line code 5. Well, do it only if there is support for touch.

T
toaster khabrovich, 2015-12-12
@studententer

Very simple
Do it instead of onclicks - ontouch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question