This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
fix(ngTouch): remove ngClick override #13852
Closed
+8
−956
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
to use ngSwipe, you may break parts of your app
FastClick, Tappy!
(There's also hammer.js for touch events / gestures)
when the usual
<meta name="viewport" content="width=device-width">
is set. In IE, thetouch-action
css property can be set tonone
ormanipulation
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 #13287
Closes #13558
Closes #12392
Closes #12153
Closes #11358
Closes #6432
Closes #12867
Closes #7231
Closes #13213
Closes #12082
Closes #4030
Closes #12545
Closes #6001
Closes #5307
Other issues:
Closes #12734
Closes #12455
Closes #11197
Closes #11261
Closes #12150
Closes #10918
Closes #10366
Closes #9872
Closes #9744
Closes #6251
Closes #4428
Closes #3999
Closes #3347
Closes #3296
Closes #7935
Closes #13272
Closes #13447
Closes #13122
Closes #12317
Closes #11577
Closes #11342
Closes #10211
Closes #9724
Closes #7134
Closes #6330
Closes #3447
BREAKING CHANGE:
The
ngClick
override from thengTouch
module has been removed. This means that ontouch-based devices, users might experience a 300ms delay before an ngClick event is fired.
If you rely on this behavior, consider using FastClick or
Tappy!. Also note that modern browsers remove the 300ms
delay under some circumstances:
<meta name="viewport" content="width=device-width">
is settouch-action
css property is set tonone
ormanipulation
See this article for more info on the topic: http://developer.telerik.com/featured/300-ms-click-delay-ios-8/