Prevent slide on sololearn for touch events | Sololearn: Learn to code for FREE!


Prevent slide on sololearn for touch events

trying to create a game in javascript with touch events but every time I slide back and forth sololearn returns to code playground. and preventDefault() does not prevent that lol.

2/17/2018 9:40:35 PM

Dick Tracy

3 Answers

New Answer


I noticed when you move your figure up then back down horizontally the slide event is disabled. can you create fake touch x,y. example if you slide left to right solo puts you back in playground, but if you slide left - up - then back down - to right. nothing happens. code works. so my second ? is can you create fade x,y touch events. to simulate that pattern.


That's the problem with Code Playground. You should report this to Sololearn via the feedback feature of the app or email them directly at [email protected] Maybe they'll finally do something about it. I've encountered this problem before. I resorted back to regular click events.


Yup, that works because the app only recognizes straight horizontal swipe actions. I don't know any solutions yet.