AnswerDotAI / fasthtml

The fastest way to create an HTML app
https://fastht.ml/
Apache License 2.0
5.65k stars 238 forks source link

[BUG] Potential SortableJS collision with touch devices #449

Open pydanny opened 2 months ago

pydanny commented 2 months ago

Describe the bug

  1. adv_app.py doesn't work that well with Chrome on touch devices (Pixel, Samsung)
  2. SortableJS.create allows arguments for touch devices that might fix the problem, but proc_htmx doesn't have a means to pass arguments

Minimal Reproducible Example

Stock adv_app.py deployed will demonstrate these problems on chrome touch:

  1. With Touch it is very hard to click on any link that is in a sortable list
  2. With Touch it is challenging to get sorting to work

Expected behavior

What should happen is:

Environment Information

Confirmation Please confirm the following:

Screenshots

Video recorded by @audreyfeldroy showing the problem: https://discord.com/channels/1200111522916094103/1287703999512051776/1287771376769433704

jph00 commented 2 months ago

Can you try modifying fasthtml.js with:

Sortable.create(sortable, { animation: 150, delay: 100, delayOnTouchOnly: true, } });