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

Text being selected on drag [Firefox] #9

Closed
johnfraney opened this issue Feb 11, 2018 · 3 comments
Closed

Text being selected on drag [Firefox] #9

johnfraney opened this issue Feb 11, 2018 · 3 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@johnfraney
Copy link
Contributor

I've noticed that when using Firefox, text is getting selected when an item is dragged over top of one or more other items. It seems to be that this happens if the initial click is in the text portion of an element (but not if the initial click is in the padding or margin).

slicksort-firefox-text-selection

@johnfraney
Copy link
Contributor Author

I did some more digging into this. The example items have a user-select: none; CSS attribute applied, which Chrome is picking up but Firefox isn't. Adding vendor-specific prefixes for user-select fixes this:

{
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

@Jexordexan
Copy link
Owner

Good call @johnfraney, I'll push an update to the CSS! I also seem to recall being able to avoid text highlighting with a special combo of event.preventDefault(). I think I might be able to prevent this on the javascript end so you don't have to add user-select: none to your own CSS and possibly prevent people from highlighting when they actually want to.

@Jexordexan Jexordexan self-assigned this Feb 12, 2018
@Jexordexan Jexordexan added bug Something isn't working good first issue Good for newcomers labels Feb 12, 2018
@johnfraney
Copy link
Contributor Author

@Jexordexan I'm noticing now in version 0.1.5 that items with the ElementMixin no longer register click events. Maybe the CSS fix is the safer option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants