Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get rid of user-select: none? #88

Open
wzup opened this issue Jan 23, 2018 · 1 comment
Open

How to get rid of user-select: none? #88

wzup opened this issue Jan 23, 2018 · 1 comment

Comments

@wzup
Copy link

wzup commented Jan 23, 2018

Your plugin disables selection on a page. It voluntary sets style="user-select: none".
How to disable it? I need to select elements

<Hammer onSwipe={this.handleSwipe} options={{defaults: {cssProps: { userSelect: true }} }} >
<Hammer onSwipe={this.handleSwipe} options={{cssProps: { userSelect: true } }} >
<Hammer onSwipe={this.handleSwipe} options={{defaults: { behavior: {cssProps: { userSelect: true }} }}} >

https://stackoverflow.com/questions/48418160/how-to-get-rid-of-user-select-none-in-react-hammer-js

@petertenhoor
Copy link

petertenhoor commented Mar 8, 2018

There was no way to fix this using the options prop. I ended up quickfixing it by adding a CSS class to the Hammer component and overwriting the hammer CSS:

.hammerContainer { user-select: all !important; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants