Skip to content

Commit a0b569a

Browse files
committed
fix(ngTouch): remove ngClick override, $touchProvider and $touch.
Closes angular#15761 Closes angular#15755 BREAKING CHANGE: The `ngClick` directive from the ngTouch module has been removed, and with the also the corresponding $touchProvider and $touch service. If you have included ngTouch in your application with version 1.5.0 or higher, 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 and Firefox for Android remove the 300ms delay when the well-known `<meta name="viewport" content="width=device-width">` is set. - Internet Explorer, Edge, and Chrome remove the delay when the `touch-action` css property is set to `none` or `manipulation`. - Since iOS 8, Safari removes the delay on so-called "slow taps". You can find out more in this Telerik article: http://developer.telerik.com/featured/300-ms-click-delay-ios-8/
1 parent cde2ddb commit a0b569a

File tree

2 files changed

+0
-55
lines changed

2 files changed

+0
-55
lines changed

src/ngTouch/touch.js

-28
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,6 @@ var ngTouch = angular.module('ngTouch', []);
2424

2525
ngTouch.info({ angularVersion: '"NG_VERSION_FULL"' });
2626

27-
ngTouch.provider('$touch', $TouchProvider);
28-
2927
function nodeName_(element) {
3028
return angular.lowercase(element.nodeName || (element[0] && element[0].nodeName));
3129
}
32-
33-
/**
34-
* @ngdoc provider
35-
* @name $touchProvider
36-
*
37-
* @description
38-
* The `$touchProvider` allows configuration of the ngTouch module. It currently contains
39-
* no methods.
40-
*/
41-
$TouchProvider.$inject = [];
42-
function $TouchProvider() {
43-
44-
/**
45-
* @ngdoc service
46-
* @name $touch
47-
* @kind object
48-
*
49-
* @description
50-
* The `$touch` service currently has no contents.
51-
*/
52-
// eslint-disable-next-line no-invalid-this
53-
this.$get = function() {
54-
return {};
55-
};
56-
57-
}

test/ngTouch/touchSpec.js

-27
This file was deleted.

0 commit comments

Comments
 (0)