@@ -14,13 +14,6 @@ var CLICK_COUNT_TIMEOUT = 200;
14
14
var ATTRIB = 'touch-action' ;
15
15
var INSTALLER ;
16
16
17
- // The presence of touch event handlers blocks scrolling, and so we must be careful to
18
- // avoid adding handlers unnecessarily. Chrome plans to add a touch-action-delay property
19
- // (crbug.com/329559) to address this, and once we have that we can opt-in to a simpler
20
- // handler registration mechanism. Rather than try to predict how exactly to opt-in to
21
- // that we'll just leave this disabled until there is a build of Chrome to test.
22
- var HAS_TOUCH_ACTION_DELAY = false ;
23
-
24
17
// handler block for native touch events
25
18
var touchEvents = {
26
19
events : [
@@ -30,19 +23,11 @@ var touchEvents = {
30
23
'touchcancel'
31
24
] ,
32
25
register : function ( target ) {
33
- if ( HAS_TOUCH_ACTION_DELAY ) {
34
- dispatcher . listen ( target , this . events ) ;
35
- } else {
36
- INSTALLER . enableOnSubtree ( target ) ;
37
- }
26
+ INSTALLER . enableOnSubtree ( target ) ;
38
27
} ,
39
- unregister : function ( target ) {
40
- if ( HAS_TOUCH_ACTION_DELAY ) {
41
- dispatcher . unlisten ( target , this . events ) ;
42
- } else {
28
+ unregister : function ( ) {
43
29
44
- // TODO(dfreedman): is it worth it to disconnect the MO?
45
- }
30
+ // TODO(dfreedman): is it worth it to disconnect the MO?
46
31
} ,
47
32
elementAdded : function ( el ) {
48
33
var a = el . getAttribute ( ATTRIB ) ;
@@ -362,9 +347,7 @@ var touchEvents = {
362
347
}
363
348
} ;
364
349
365
- if ( ! HAS_TOUCH_ACTION_DELAY ) {
366
- INSTALLER = new Installer ( touchEvents . elementAdded , touchEvents . elementRemoved ,
367
- touchEvents . elementChanged , touchEvents ) ;
368
- }
350
+ INSTALLER = new Installer ( touchEvents . elementAdded , touchEvents . elementRemoved ,
351
+ touchEvents . elementChanged , touchEvents ) ;
369
352
370
353
export default touchEvents ;
0 commit comments