Skip to content

Commit 050db20

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 015c837 commit 050db20

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
@@ -22,34 +22,6 @@
2222
/* global ngTouch */
2323
var ngTouch = angular.module('ngTouch', []);
2424

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

test/ngTouch/touchSpec.js

-27
This file was deleted.

0 commit comments

Comments
 (0)