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

Commit

Permalink
fix(ngTouch): remove ngClick override, $touchProvider, and $touch
Browse files Browse the repository at this point in the history
Closes #15761
Closes #15755

BREAKING CHANGE:

The `ngClick` directive from the ngTouch module has been removed, and with it the
corresponding `$touchProvider` and `$touch` service.

If you have included ngTouch v1.5.0 or higher in your application, and have not
changed the value of `$touchProvider.ngClickOverrideEnabled()`, or injected and used the `$touch`
service, then there are no migration steps for your code. Otherwise you must remove references to
the provider and service.

The `ngClick` override directive had been deprecated and by default disabled since v1.5.0,
because of buggy behavior in edge cases, and a general trend to avoid special touch based
overrides of click events. In modern browsers, it should not be necessary to use a touch override
library:

- Chrome, Firefox, Edge, and Safari remove the 300ms delay when
  `<meta name="viewport" content="width=device-width">` is set.
- Internet Explorer 10+, Edge, Safari, and Chrome remove the delay on elements that have the
  `touch-action` css property is set to `manipulation`.

You can find out more in these articles:
https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away
https://developer.apple.com/library/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_9_1.html#//apple_ref/doc/uid/TP40014305-CH10-SW8
https://blogs.msdn.microsoft.com/ie/2015/02/24/pointer-events-w3c-recommendation-interoperable-touch-and-removing-the-dreaded-300ms-tap-delay/
  • Loading branch information
Narretz authored Mar 14, 2017
1 parent 5a13cac commit 11d9ad1
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 1,154 deletions.
1 change: 0 additions & 1 deletion angularFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ var angularFiles = {
'ngTouch': [
'src/ngTouch/touch.js',
'src/ngTouch/swipe.js',
'src/ngTouch/directive/ngClick.js',
'src/ngTouch/directive/ngSwipe.js'
],
'ngAria': [
Expand Down
2 changes: 1 addition & 1 deletion docs/content/misc/downloading.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ The set of files included in each version directory are:
* __`angular-route.js`__ — Routing and deep-linking services and directives for AngularJS apps.
({@link module:ngRoute API docs})
* __`angular-sanitize.js`__ — Functionality to sanitize HTML. ({@link module:ngSanitize API docs})
* __`angular-touch.js`__ — Touch events and other helpers for touch-enabled devices.
* __`angular-touch.js`__ — Touch events for touch-enabled devices.
({@link module:ngTouch API docs})


Expand Down
298 changes: 0 additions & 298 deletions src/ngTouch/directive/ngClick.js

This file was deleted.

Loading

0 comments on commit 11d9ad1

Please sign in to comment.