stuyam / pressure

:point_down::boom: JavaScript library for handling Force Touch, 3D Touch, and Pointer Pressure.
https://pressurejs.com
MIT License
2.91k stars 98 forks source link

Light touch triggers timing fallback when it should track pressure #50

Closed henrahmagix closed 7 years ago

henrahmagix commented 7 years ago

When I touch and hold lightly enough on the demos, the timing fallback triggers and a message shows saying force touch isn't supported, when it should be using force touch. Applying pressure then glitches between the pressure value and timing value.

I can't remember if it did that in the previous version, sorry =)


Device is an iPhone 6S Operating system is iOS 10 Browser is Chrome

stuyam commented 7 years ago

Thanks for reporting this @henrahmagix, I am gonna look into this this weekend!

lucdetellis commented 7 years ago

+1, having this issue as well. macOS 10.12, Safari

stuyam commented 7 years ago

This should be the fixed on both iOS and MacOS. If a touch happens lightly on either platform the unsupported or polyfill may be called, that part is a little of of my control (unless someone comes up with a better solution). But now, even if unsupported or the polyfill is called and force is detected at any point during that touch/press, it will cancel the polyfill and native support will kick in. https://github.com/stuyam/pressure/commit/d6f64f113fb99af26cf197d602ed6ae3ab73090b

stuyam commented 7 years ago

@henrahmagix and @lucdetellis I published a fix and update the docs site. Let me know if it is still an issue 👍 Else I will close this issue in the coming days.

lucdetellis commented 7 years ago

Looks like it's fixed for Safari on both macOS and iOS! The only thing is that on my Mac I still get the "Pressure.js has fallen back to the polyfill" message even though it's working properly.

henrahmagix commented 7 years ago

Yep same: fixed but error message still shows :)

stuyam commented 7 years ago

Does that message show up on every press or just when you tap lightly?

henrahmagix commented 7 years ago

Just tap lightly and isn't removed when adding pressure

introrse commented 7 years ago

I'm still seeing this issue on my iphone 6S both with examples on pressurejs.com as well as with my own code using 2.0.3. I get the fallback and no force messages at all.

The same 6S device exhibits 3D touch behavior just fine with the (pressure.js-using) V-day card from Henry Blyth.

This is with Safari on iOS 9.3.4, and applies for both light and firm touches. (Thus it might not be the same issue since the above only references light touches.)

stuyam commented 7 years ago

@introrse can you clarify what you mean by "I get the fallback and no force messages at all."