Giter VIP home page Giter VIP logo

Comments (11)

grotos avatar grotos commented on August 23, 2024

Same here: it works in Firefox, but in Chrome you have to touch to sort table.

from sortable.

adamschwartz avatar adamschwartz commented on August 23, 2024

Ahh, it makes sense that would be the behavior based on this and this.

If we bind to both touchstart and click, maybe we could do something like this? @zackbloom know of a better pattern here?

from sortable.

zackbloom avatar zackbloom commented on August 23, 2024

What you really want is Pointer Events (https://github.com/jquery/PEP), but as browser support is not great yet, a common thing is to bind to both touchstart and click, but either debounce (like the first example in that SO post), or mark the event as handled somehow (like the second). I think what you suggest would do exactly what you need.

from sortable.

adamschwartz avatar adamschwartz commented on August 23, 2024

whoa cool, thanks. microsoft is killin it right now :P

cool, yeah. is that kosher though marking the event itself?

from sortable.

zackbloom avatar zackbloom commented on August 23, 2024

Depends who you ask. I would double check that it doesn't error in old-IE or Safari, but my guess is that you'll get away with it.

from sortable.

adamschwartz avatar adamschwartz commented on August 23, 2024

hehe k, thx

from sortable.

adamschwartz avatar adamschwartz commented on August 23, 2024

Fixed with cab1613

from sortable.

smartcorestudio avatar smartcorestudio commented on August 23, 2024

Hmm... Yust tested your demo http://github.hubspot.com/sortable/ in the latest Firefox on classic old-school desktop (without touch support) on Windows 10. Here is the screencast: https://www.youtube.com/watch?v=E33lwZd8dio

from sortable.

adamschwartz avatar adamschwartz commented on August 23, 2024

@smartcorestudio thanks so much for sharing that. v0.8.0 should fix it. Please let me know if it doesn’t. Thanks!

from sortable.

smartcorestudio avatar smartcorestudio commented on August 23, 2024

It works OK now! Thank you for quick fix!

from sortable.

adamschwartz avatar adamschwartz commented on August 23, 2024

@smartcorestudio awesome. No problem! Thanks for the video. 👍

from sortable.

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.