diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..d742a97c --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Guessed from commit history +* @Financial-Times/apps diff --git a/.npmignore b/.npmignore index b3ff1517..2411778c 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,7 @@ .gitignore -Makefile +.npmignore +bower.json component.json -tests examples +Makefile +tests diff --git a/README.md b/README.md index de3f2a06..4e659ae3 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ FastClick is a simple, easy-to-use library for eliminating the 300ms delay betwe FastClick is developed by [FT Labs](http://labs.ft.com/), part of the Financial Times. +*Note: As of late 2015 most mobile browsers - notably Chrome and Safari - no longer have a 300ms touch delay, so fastclick offers no benefit on newer browsers, and risks introducing [bugs](https://github.com/ftlabs/fastclick/issues) into your application. Consider carefully whether you really need to use it.* + [Explication en français](http://maxime.sh/2013/02/supprimer-le-lag-des-clics-sur-mobile-avec-fastclick/). [日本語で説明](https://developer.mozilla.org/ja/docs/Mozilla/Firefox_OS/Apps/Tips_and_techniques#Make_events_immediate)。 diff --git a/bower.json b/bower.json index 18e1abd4..3cd398ed 100644 --- a/bower.json +++ b/bower.json @@ -1,5 +1,6 @@ { "name": "fastclick", + "license": "MIT", "main": "lib/fastclick.js", "ignore": [ "**/.*", diff --git a/lib/fastclick.js b/lib/fastclick.js index 3af4f9d6..225ff660 100644 --- a/lib/fastclick.js +++ b/lib/fastclick.js @@ -326,7 +326,7 @@ var length; // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724. - if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') { + if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month' && targetElement.type !== 'email') { length = targetElement.value.length; targetElement.setSelectionRange(length, length); } else { @@ -600,7 +600,7 @@ } // Prevent the actual click from going though - unless the target node is marked as requiring - // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted. + // real clicks or if it is in the allowlist in which case only non-programmatic clicks are permitted. if (!this.needsClick(targetElement)) { event.preventDefault(); this.sendClick(targetElement, event);