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

Grips don't receive focus when clicked on #9

Open
AleksueiR opened this issue Jul 14, 2014 · 4 comments
Open

Grips don't receive focus when clicked on #9

AleksueiR opened this issue Jul 14, 2014 · 4 comments

Comments

@AleksueiR
Copy link

If you move the mouse cursor outside the slider while dragging handles, text on the page gets selected. I don't think it was intended that way, and it's kinda distracting.

screenhunter_436 jul 14 10 11

Why not add e.preventDefault(); to the drag_move_func function to prevent text selection?

@mtmail
Copy link
Contributor

mtmail commented Jul 14, 2014

Great suggestion. I tested in on a private project that had the same issue. Patch is in #10

@darksmo
Copy link
Contributor

darksmo commented Jul 14, 2014

Thanks everyone, @AleksueiR please try version 1.0.5 that was just released and let me know should you have any problem.

@darksmo
Copy link
Contributor

darksmo commented Jul 14, 2014

@AleksueiR you can try directly on the demo page at lokku.github.io/jquery-nstslider which is updated with version 1.0.5 .

@AleksueiR
Copy link
Author

Thanks @darksmo and @mtmail, it works fine now - no unnecessary text selection.

I did notice though that now grips don't receive focus when clicked on (they still get focus when tabbed to), so you can't style them through :focus pseudo-class when dragging. :active still works though.

@darksmo darksmo changed the title Prevent text selection while dragging handles Grips don't receive focus when clicked on Apr 17, 2016
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

3 participants