Skip to content

Conversation

@esseb
Copy link
Contributor

@esseb esseb commented Mar 20, 2016

Fails in Firefox on Mac at least, Safari and Chrome are fine.

Steps to reproduce:

  1. Open the demo at http://codepen.io/davidchin/full/GpNvqw/ in Firefox
  2. Click and hold one of the handles in the top slider in order to initiate a drag
  3. While still holding down the mousebutton, drag straight up

Result:
The number above the handle gets selected.

I just use event.preventDefault() to prevent text selection during the mouse move event.

@davidchin
Copy link
Owner

Thanks @esseb for your input. I think this is probably a CSS issue. i.e.:

.InputRange-label {
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

Adding the above rule can probably get around the issue.

@esseb
Copy link
Contributor Author

esseb commented Mar 22, 2016

@davidchin that solves the selection of the label issue, but it's still possible to select other text on the page if you drag a bit more and have an <h2> just above the react range input slider.

@esseb
Copy link
Contributor Author

esseb commented Mar 22, 2016

Also, I would actually want to be able to select the text of the label if I intentionally try to do it by clicking elsewhere and dragging, I just don't want it to happen as a side effect while dragging the slider.

@davidchin davidchin merged commit 1a31253 into davidchin:master Apr 10, 2016
@davidchin
Copy link
Owner

Ok sounds good, thanks for looking into this.

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

Successfully merging this pull request may close these issues.

2 participants