Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This would be a mistake, a common one though.

Instead of disallowing selection on the text with CSS, call `event.preventDefault()` in the click handler. This keeps a click that you handle from triggering the built-in text selection path, but you can still click-and-drag to select text.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: