react-fastclick-alt
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -148,7 +148,7 @@ 'use strict'; | ||
var target = tch.target; | ||
var targetEl = tch.target; | ||
// if it's an input where typing is allowed and it's already focused, | ||
// don't do anything. this is probably an attempt to move the cursor | ||
if ((isFocusedInput(target) || isFocusedTextArea(el)) && !isCheckbox(el)) { | ||
if ((isFocusedInput(targetEl) || isFocusedTextArea(targetEl)) && !isCheckbox(targetEl)) { | ||
this.clearTouchData(); | ||
@@ -164,3 +164,3 @@ return; | ||
this.clearTouchData(function () { | ||
this.triggerClick(target); | ||
this.triggerClick(targetEl); | ||
}); | ||
@@ -167,0 +167,0 @@ }, |
{ | ||
"name": "react-fastclick-alt", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "A react component that triggers click events for taps", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,5 +9,13 @@ # react-fastclick | ||
# Component Usage | ||
Simply wrap your component in an instance of this component, and it should respond to short taps with immediate click | ||
Wrap your component in an instance of this component, and it should respond to short taps with immediate click | ||
events. | ||
var React = require('react'); | ||
var FastClick = require('react-fastclick-alt'); | ||
var ReactDOM = require('react-dom'); | ||
ReactDOM.render(FastClick({}, MyApp()), document.getElementById('app')); | ||
Note this is safe to do even if child components include react-fastclick-alt because a touchend event that triggers | ||
a click will not be propagated. | ||
## Properties | ||
@@ -21,2 +29,2 @@ There are two optional props to this component. | ||
### timeThreshold (Number) | ||
How long a tap can be held before it can no longer be converted to a click, in milliseconds. Defaults to 125ms. | ||
How long a tap can be held before it can no longer be converted to a click, in milliseconds. Defaults to 125ms. |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ var webpack = require('webpack'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
29
31084
16