Giter Site home page Giter Site logo

Click on touch device about sly HOT 7 CLOSED

darsain avatar darsain commented on August 19, 2024
Click on touch device

from sly.

Comments (7)

darsain avatar darsain commented on August 19, 2024

I'll look into it. By that I mean I'll try to find some articles or docs regarding click events on touch devices and incorporate that somehow to Sly, as I don't have any device to test it on :) So anything I do for mobile is basically by faith. But it seems that touch events support was successful if it works for you, and there are no other issues :)

The other question: no, forceLeft and forceRight are not supported navigation types.

from sly.

darsain avatar darsain commented on August 19, 2024

@lolo34140: do you have by chance also enabled content dragging? do clicks work when you disable content dragging?

Content dragging was enabled by dragContent option in earlier version, and drag option in current API.

from sly.

 avatar commented on August 19, 2024

Thank you for your answere.

I try with this :

    I can click on an item with a touch device but I can't scroll. I can't have the both (finger swipe and finger click) working together.

    On ipad and iPhone the scrolling is very slow and buggy. However on a PC this is smooth.

    And for the forced position, is there any way to forced on left?

from sly.

darsain avatar darsain commented on August 19, 2024

I'm sure this problem was in a very small path length required for a mouse to move before Sly will initialize dragging. This length is 10 pixels, and is OK for a mouse, but it seems to be too low for touch, as that is a lot less accurate.

The commit referenced above implements a ternary statement where if the click started with a touch event, the minimal path for initializing dragging is bumped to 50 pixels. Don't know whether it is enough though. Needs to be tested.

from sly.

KingScooty avatar KingScooty commented on August 19, 2024

Yeah, @lolo34140 isn't wrong concerning the click on iOS devices. Af first, i wasn't sure whether it was jsFiddle messing up - testing a fiddle on an iPad is awful.

But i moved the code to a local test server, and had the same issue.

http://jsfiddle.net/vF8xd/2/

Dragging is fine, but the click event doesn't fire on iOS/touch devices, but does on non touch.

from sly.

KingScooty avatar KingScooty commented on August 19, 2024

I might add that disabling Sly brings back the click functionality on iOS / touch devices. So it appears Sly is interfering with something :/

from sly.

darsain avatar darsain commented on August 19, 2024

This issue is described in more detail in #27, so I'm closing this one and moving the conversation there.

from sly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.