Skip to content
This repository was archived by the owner on Feb 11, 2021. It is now read-only.

Commit 3599adb

Browse files
author
RByers
committed
Don't look for touch-action-delay support
Chrome 33 has a bug where the CSS OM objects exist for touchActionDelay even though parsing will always fail for them, so we'd incorrectly believe support was present. Let's wait until there's actually a Chrome build to test before trying to enable a touch-action-delay fast-path.
1 parent 732cb6a commit 3599adb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/touch.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@
1515
var CLICK_COUNT_TIMEOUT = 200;
1616
var ATTRIB = 'touch-action';
1717
var INSTALLER;
18-
var HAS_TOUCH_ACTION_DELAY = (typeof document.head.style.touchActionDelay) === 'string';
19-
18+
// The presence of touch event handlers blocks scrolling, and so we must be careful to
19+
// avoid adding handlers unnecessarily. Chrome plans to add a touch-action-delay property
20+
// (crbug.com/329559) to address this, and once we have that we can opt-in to a simpler
21+
// handler registration mechanism. Rather than try to predict how exactly to opt-in to
22+
// that we'll just leave this disabled until there is a build of Chrome to test.
23+
var HAS_TOUCH_ACTION_DELAY = false;
24+
2025
// handler block for native touch events
2126
var touchEvents = {
2227
scrollType: new WeakMap(),

0 commit comments

Comments
 (0)