Closed Joan closed 8 years ago
I don't know how to fix that code, but I've hit the same problem. I see the last commit is causing the issue and it was simply a minor refactor. What I did instead was the downgrade my konami.js
to the previous commit: https://github.com/snaptortoise/konami-js/blob/1ac35c58e5a4554d60cfc0e174dcf4816a6207d6/konami.js
Actually, it never worked for me on mobile (only on desktop), but at least now it stopped breaking the whole site.
You are both correct. I played with it for a bit and the problem seemed to reside with the way it was returning TAP.
My fault for not testing the previous commit more thoroughly. I like the idea of optimizing it further — and perhaps even building some automated tests into this project? — but I'd prefer it simply work, so I've more or less reverted it to how it was.
I've updated the GitHub page to use the code for future testing: http://code.snaptortoise.com/konami-js/
If you guys can confirm the updated version is working correctly for you I'll close this and revisit bringing in some of the previous optimizations at another time.
This new version/downgrade is confirmed working. Thanks!
A call is made to
konami.touchCapture
, but it exists askonami.iphone.touchCapture
. Moreover, when loggingresult
at the end ofcheck_direction
, the result for a UP gesture is UP, DOWN, idem for a DOWN gesture, and the result for a TAP is LEFT. Don't know if it's in relation, but doesn't work at all on any mobile device. Thanks!