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

Interactive elements & click on touch devices when dragging enabled #27

Closed
snowbeluga opened this issue Feb 7, 2013 · 4 comments
Closed

Comments

@snowbeluga
Copy link

So I noticed that when dragging is enabled you lose the ability to enter an input field, or use a select field. Checkboxes do still work though.

I'm assuming this is to do with a prevent default call in the script.

Not sure if there is a way round it..?

@darsain
Copy link
Owner

darsain commented Oct 10, 2013

Ok, I've cleaned up the comments, and lets finally address this. With a recent series of patches that rewrote dragging initiation to be more responsive (get from src/sly.js), this issue now affects all devices and input types (mouse/touch). Success! :)

What I want to do is cancel dragging initiation when finger or mouse is above any interactive element. For that, I need a list of interactive elements :) So, if I forgot something, tell me what I'm missing:

Definitely cancel for:

  • input
  • textarea
  • select
  • button
  • datalist
  • keygen

Maybe disable for:

  • label

Also there will probably need to be an option that will extend this list with selectors.

@lithiumlab
Copy link

the A (link) element, perhaps?
im having issues on touch devices when an element is interactive and a scroll by touch is triggered.
it also triggers the click. (in this case a thumbnail opening an overlay window).

maybe its the way its supossed to work but i need to prevent the click when the gesture is a swipe up/down.
only execute the click on the item when is a tap or simple click.

any suggestions?

@darsain
Copy link
Owner

darsain commented Oct 20, 2013

Have you tried `src/sly.js' ?

@darsain
Copy link
Owner

darsain commented Oct 31, 2013

v1.2.0 landed. Sly now won't start dragging when initiated on an interactive element. By default, Sly recognizes button, 'input', 'select', and 'textarea' as interactive. You can expand this pool by passing a selector into the interactive option.

Closing this for now. If there are more issues with this I'll reopen it.

@darsain darsain closed this as completed Oct 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants