react-fastclick | Fast Touch Events for React | Mobile library
kandi X-RAY | react-fastclick Summary
kandi X-RAY | react-fastclick Summary
React Fastclick automatically adds fastclick touch events to elements with onClick attributes (and those that require special functionality, such as inputs) to prevent the delay that occurs on some touch devices.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-fastclick
react-fastclick Key Features
react-fastclick Examples and Code Snippets
Community Discussions
Trending Discussions on react-fastclick
QUESTION
I made this very simple codesandbox to show my problem.
When I click the 'x' icon that appears after adding isClearable
to the Select component, it both clears the selection AND it also opens the dropdown. I do not want to open the dropdown menu, but I cannot figure out how to stop it. Any ideas?
This problem only exists on mobile browsers. The clear function works as expected on desktop browsers. To see the codesandbox on mobile, open Chrome devtools and click the "toggle device toolbar" button.
EDIT: Since I haven't received a response yet (22 hours), here are some more details. This discussion most closely resembles my issue. They discuss the cause may be due to the react-tap-event-plugin.
I have tried using the react-fastclick package since I thought it may be a delayed tap (long-pressing in mobile does not open menu).
I have tried adding a div around the Select
component with the attribute onClick={e => { e.preventDefault(); e.stopPropagation(); }}
I have tried adding a dummy div, and calling document.getElementById("dummy").focus()
at the end of the onChange
event in the Select
component.
EDIT 2: If you add an event break-point for the touchend
event, click the 'x' causing the script to pause, then press F8 (resume script), the menu will not open. There must be some sort of delayed tap happening.
ANSWER
Answered 2020-Apr-29 at 03:18check this
Still not working well at least, it will give you hint how to modify the default behavior.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-fastclick
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page