Giter VIP home page Giter VIP logo

Comments (6)

darsain avatar darsain commented on July 17, 2024

Can you test the src/sly.js version, and how does it work for you?

It has some fixes regarding this issue, but I'm not sure whether it is without side effects (I don't have any device to test it on), so it is not in the distribution version yet.

from sly.

marcosesperon avatar marcosesperon commented on July 17, 2024

With this version tap works fine as click. But now I have problems with drag scroll in horizontal lists.

You can emulate touch events to try with the Chrome Developer Tools:

chrome-touch

Thanks for reply so quick! ;)

from sly.

darsain avatar darsain commented on July 17, 2024

When you say problems with drag scroll, what exactly do you mean? And are you testing on some device, or only with Chrome's touch emulation?


I know about that, but that can get you only so far. It is just a very basic emulation, and mostly irrelevant if you need to test touch events and everything associated to them (page scrolling, clicks/taps, swipes,...).

Chrome's touch events emulation is really not enough. Definitely not for testing Sly.

from sly.

marcosesperon avatar marcosesperon commented on July 17, 2024

Tested on Nexus 7 (4.2.2) sometimes the drag event doesn't respond.
Tested on iPad (iOS 6) the list doesn't move because the entire page tries to scroll in vertical mode.

I know that Chrome has its limitations with touch event emulation, but Chrome Canary has better support than previous versions and sometimes helps when you don't have a real device near.

Thanks.

from sly.

darsain avatar darsain commented on July 17, 2024

In recent commits I've overhauled the dragging initiation to make it a lot more responsive. This change also includes a lot lowered "path to definite initiation", which is path after which Sly cancels, or completely takes over dragging and disables click caused on touchend. This path is now 5 pixels, and probably needs to be tweaked for touch devices.

What is actually happening: When you touchstart and move, at the point when you've reached pathToLock destination (currently 5 pixels) Sly determines whether you are dragging in the same direction as Sly (horizontal/vertical). If you are, Sly disables next click. If you are not, Sly cancels dragging and lets browser handle all touch events.

Path of 5 pixels might be extremely low on touch devices, as tapping while unintentionally moving a finger a little might actually cause 5px touchmove, so it should be tested. If there is too much of incorrect determinations (click disabled on tapping), it has to be bumped up.

The development version with changes is in src/sly.js.

The pathToLock can be tweaked on line 102.

from sly.

darsain avatar darsain commented on July 17, 2024

Merging this issue into #27

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.