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

Add user-select:none to prevent text selection when "dragging" between options #292

Closed
nicknotfound opened this issue Oct 12, 2011 · 0 comments · Fixed by #1374
Closed
Labels

Comments

@nicknotfound
Copy link

When making a selection with the mouse pointer, a normal select box chooses the item you're on when the mouse button is released (which can be different from the item you're on when the mouse button is pressed down). This behavior is the same in a Chosen select box as well (nicely done!). However, when pressing the mouse and dragging it to another item, the text of the items you drag past is selected.

This can be prevented by simply adding the following CSS to the .chzn-container .chzn-results li selector:

.chzn-container .chzn-results li {
  /* ... */
  -webkit-user-select: none;
     -moz-user-select: none;
       -o-user-select: none;
          user-select: none;
}

Also, thanks for such an awesome library!

pfiller added a commit that referenced this issue Jul 19, 2013
This is especially nice when users click and drag to select.

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

Successfully merging a pull request may close this issue.

1 participant