+ 4

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.

17th Feb 2018, 9:40 PM
Dick Tracy
Dick Tracy - avatar
3 Answers
+ 3
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.
18th Feb 2018, 1:20 AM
Dick Tracy
Dick Tracy - avatar
0
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 info@sololearn.com. Maybe they'll finally do something about it. I've encountered this problem before. I resorted back to regular click events.
18th Feb 2018, 12:18 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
- 1
Yup, that works because the app only recognizes straight horizontal swipe actions. I don't know any solutions yet.
18th Feb 2018, 2:06 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar