Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

link selection doesn't work on IOS safari #13287

Closed
xavierva opened this issue Nov 10, 2015 · 10 comments
Closed

link selection doesn't work on IOS safari #13287

xavierva opened this issue Nov 10, 2015 · 10 comments

Comments

@xavierva
Copy link

let me explain, when a long click on a link i expect this to happen :
screenshot_11_10_15__11_17_am

I'm doing <a ng-href="{{url}}">{{url}}</a> on Firefox+Chrome android and it work perfectly. But on iOS safari the link is not recognize.

Is it an issue, or am I doing it wrong ?

@Narretz
Copy link
Contributor

Narretz commented Nov 10, 2015

What does your link html look like?

@Narretz Narretz added this to the Purgatory milestone Nov 10, 2015
@xavierva
Copy link
Author

Hi, sorry my code was missformated I updated my post.

And here is a sample of html link : http://mydomain.com/5cMx5sw6TdeNwsQfr/organizer
or http://sub.mydomain.com/5cMx5sw6TdeNwsQfr/organizer

@Narretz
Copy link
Contributor

Narretz commented Nov 10, 2015

Can you try with adding an empty src="" attribute? And do you have ngTouch enabled by any chance?

@xavierva
Copy link
Author

I just tried adding src=""but with now result. Yes I have ngTouch enabled.

@Narretz
Copy link
Contributor

Narretz commented Nov 10, 2015

Can you try without ngTouch? It's unfortunately very buggy.

@xavierva
Copy link
Author

Done, unfortunately same result.

may be i should also specify that I am using angular with Meteor 1.2.1

@Narretz
Copy link
Contributor

Narretz commented Nov 11, 2015

Can you try and see if the problem appears in an angular-only app, too? Basically, the most simple demo possible. And which angular version do you use?

@xavierva
Copy link
Author

I just tried it in a Plunker : http://plnkr.co/edit/NHVcoDGdyGdmro96rV6V?p=preview
And it works.

But, actualy when I my example i click on my link I'm well redirected. It is only the long click that do nothing.

@Narretz
Copy link
Contributor

Narretz commented Nov 13, 2015

Interesting. So the long touch / click works in the simple example? Then you'll have to find out which part of your app modifies the click behavior. I'd say it doesn't look like a bug in angular core.

@Narretz Narretz modified the milestones: Ice Box, ngTouch Overhaul Jan 26, 2016
Narretz added a commit to Narretz/angular.js that referenced this issue Jan 26, 2016
This commit removes the ngClick directive from the ngTouch module.
The directive was conceived to remove the 300ms delay
for click events on mobile browsers, by sending a synthetic click event on touchstart.
It also tried to make sure that the original click event that the browser sends after 300ms
was "busted", so that no redundant "ghost-clicks" appear.

There are various reasons why this feature has been removed:

- "This is an ugly, terrible hack!" (says so in the source)
- It is plagued by various bugs that are hard to fix / test for all platforms (see below)
- Simply including ngTouch activates the ngClick override, which means even if you simply want
to use ngSwipe, you may break parts of your app
- There exist alternatives for removing the 300ms delay, that can be used very well with Angular:
[FastClick](https://github.com/ftlabs/fastclick), [Tappy!](https://github.com/filamentgroup/tappy/)
(There's also hammer.js for touch events / gestures)
- The 300ms delay itself is on the way out - Chrome and Firefox for Android remove the 300ms delay
when the usual `<meta name="viewport" content="width=device-width">` is set. In IE, the
`touch-action` css property can be set to `none` or `manipulation` to remove the delay. Finally,
since iOs 8, Safari doesn't delay "slow" taps anymore. There are some caveats though, which can be
found in this excellent article on which this summary is based: http://developer.telerik.com/featured/300-ms-click-delay-ios-8/

Note that this change does not affect the `ngSwipe` directive.

Issues with interactive elements (input, a etc.) when parent element has ngClick:
Closes angular#13287
Closes angular#13558
Closes angular#12392
Closes angular#12153
Closes angular#11358
Closes angular#6432
Closes angular#12867
Closes angular#7231
Closes angular#13213
Closes angular#12082
Closes angular#4030
Closes angular#12545
Closes angular#6001
Closes angular#5307

Other issues:
- incorrect event order
- incorrect event propagation
- ghost-clicks / failing clickbusting with corner cases
- browser specific bugs
- et al.
Closes angular#12734
Closes angular#12455
Closes angular#11197
Closes angular#11261
Closes angular#12150
Closes angular#10918
Closes angular#10366
Closes angular#9872
Closes angular#9744
Closes angular#6251
Closes angular#4428
Closes angular#3999
Closes angular#3347
Closes angular#3296
Closes angular#7935
Closes angular#13272
Closes angular#13447
Closes angular#13122
Closes angular#12317
Closes angular#11577
Closes angular#11342
Closes angular#10211
Closes angular#9724
Closes angular#7134
Closes angular#6330
Closes angular#3447

BREAKING CHANGE:

The `ngClick` override from the `ngTouch` module has been removed. This means that on
touch-based devices, users might experience a 300ms delay before an ngClick event is fired.

If you rely on this behavior, consider using [FastClick](https://github.com/ftlabs/fastclick) or
[Tappy!](https://github.com/filamentgroup/tappy/). Also note that modern browsers remove the 300ms
delay under some circumstances:
- Chrome and Firefox for Android remove the 300ms delay when the well-known `<meta name="viewport" content="width=device-width">` is set
- Internet Explorer removes the delay when  `touch-action` css property is set to `none` or `manipulation`
- Since iOs 8, Safari removes the delay on so-called "slow taps"
See this article for more info on the topic: http://developer.telerik.com/featured/300-ms-click-delay-ios-8/
Narretz added a commit to Narretz/angular.js that referenced this issue Jan 26, 2016
This commit removes the ngClick directive from the ngTouch module.
The directive was conceived to remove the 300ms delay
for click events on mobile browsers, by sending a synthetic click event on touchstart.
It also tried to make sure that the original click event that the browser sends after 300ms
was "busted", so that no redundant "ghost-clicks" appear.

There are various reasons why this feature has been removed:

- "This is an ugly, terrible hack!" (says so in the source)
- It is plagued by various bugs that are hard to fix / test for all platforms (see below)
- Simply including ngTouch activates the ngClick override, which means even if you simply want
to use ngSwipe, you may break parts of your app
- There exist alternatives for removing the 300ms delay, that can be used very well with Angular:
[FastClick](https://github.com/ftlabs/fastclick), [Tappy!](https://github.com/filamentgroup/tappy/)
(There's also hammer.js for touch events / gestures)
- The 300ms delay itself is on the way out - Chrome and Firefox for Android remove the 300ms delay
when the usual `<meta name="viewport" content="width=device-width">` is set. In IE, the
`touch-action` css property can be set to `none` or `manipulation` to remove the delay. Finally,
since iOs 8, Safari doesn't delay "slow" taps anymore. There are some caveats though, which can be
found in this excellent article on which this summary is based: http://developer.telerik.com/featured/300-ms-click-delay-ios-8/

Note that this change does not affect the `ngSwipe` directive.

Issues with interactive elements (input, a etc.) when parent element has ngClick:
Closes angular#13287
Closes angular#13558
Closes angular#12392
Closes angular#12153
Closes angular#11358
Closes angular#6432
Closes angular#12867
Closes angular#7231
Closes angular#13213
Closes angular#12082
Closes angular#4030
Closes angular#12545
Closes angular#6001
Closes angular#5307

Other issues:
- incorrect event order
- incorrect event propagation
- ghost-clicks / failing clickbusting with corner cases
- browser specific bugs
- et al.
Closes angular#12734
Closes angular#12455
Closes angular#11197
Closes angular#11261
Closes angular#12150
Closes angular#10918
Closes angular#10366
Closes angular#9872
Closes angular#9744
Closes angular#6251
Closes angular#4428
Closes angular#3999
Closes angular#3347
Closes angular#3296
Closes angular#7935
Closes angular#13272
Closes angular#13447
Closes angular#13122
Closes angular#12317
Closes angular#11577
Closes angular#11342
Closes angular#10211
Closes angular#9724
Closes angular#7134
Closes angular#6330
Closes angular#3447

BREAKING CHANGE:

The `ngClick` override from the `ngTouch` module has been removed. This means that on
touch-based devices, users might experience a 300ms delay before an ngClick event is fired.

If you rely on this behavior, consider using [FastClick](https://github.com/ftlabs/fastclick) or
[Tappy!](https://github.com/filamentgroup/tappy/). Also note that modern browsers remove the 300ms
delay under some circumstances:
- Chrome and Firefox for Android remove the 300ms delay when the well-known `<meta name="viewport" content="width=device-width">` is set
- Internet Explorer removes the delay when  `touch-action` css property is set to `none` or `manipulation`
- Since iOs 8, Safari removes the delay on so-called "slow taps"
See this article for more info on the topic: http://developer.telerik.com/featured/300-ms-click-delay-ios-8/
@Narretz
Copy link
Contributor

Narretz commented May 26, 2016

Closing due to lack of feedback.

@Narretz Narretz closed this as completed May 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants