Skip to content

Commit 6c8726e

Browse files
committed
Update FastClick
1 parent b8fbbdd commit 6c8726e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

assets/javascripts/vendor/fastclick.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
33
*
4-
* @version 1.0.1
4+
* @version 1.0.2
55
* @codingstandard ftlabs-jsv2
66
* @copyright The Financial Times Limited [All Rights Reserved]
77
* @license MIT License (see LICENSE.txt)
@@ -12,7 +12,7 @@
1212

1313

1414
/**
15-
* Instantiate fast-clicking listeners on the specificed layer.
15+
* Instantiate fast-clicking listeners on the specified layer.
1616
*
1717
* @constructor
1818
* @param {Element} layer The layer to listen on
@@ -743,7 +743,7 @@ FastClick.notNeeded = function(layer) {
743743
return true;
744744
}
745745
// Chrome 32 and above with width=device-width or less don't need FastClick
746-
if (chromeVersion > 31 && window.innerWidth <= window.screen.width) {
746+
if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
747747
return true;
748748
}
749749
}
@@ -775,7 +775,7 @@ FastClick.attach = function(layer, options) {
775775
};
776776

777777

778-
if (typeof define !== 'undefined' && define.amd) {
778+
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
779779

780780
// AMD. Register as an anonymous module.
781781
define(function() {

0 commit comments

Comments
 (0)