cubiq / iscroll

Smooth scrolling for the web
http://iscrolljs.com
MIT License
12.87k stars 3.8k forks source link

Clicks within iscroll on a touch laptop with the mouse #1050

Closed amanda-- closed 8 years ago

amanda-- commented 8 years ago

I've got a client working on a Microsoft Surface (which is detected as a touch device so I guess treated like a mobile phone or tablet). Tapping (touch event) on the screen causes links to go to the next page, but using the trackpad or a mouse (click event) doesn't do anything.

I've tried different settings, but I can't get it to work.

glebmachine commented 8 years ago

Can you provide a repro?

amanda-- commented 8 years ago

I've made an example here: http://prototype.dpdk.com/iscroll-test/

I've figured out the "click:true" is causing it. But without it the clicks don't work at all on any touch device. Is there another way to get clicks (taps) te work on mobile devices?

amanda-- commented 8 years ago

We've implemented the tap event instead of click:true and that seems to fix the issue.

I do think it's a shame tapping isn't supported by default and needs custom implementing.

alvarotrigo commented 8 years ago

I do think it's a shame tapping isn't supported by default and needs custom implementing.

Yeah, that's quite a big bug in iScroll.js related with this issue: https://github.com/cubiq/iscroll/issues/783