Skip to content

Commit 48da68e

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 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/
1 parent cde2ddb commit 48da68e

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)