briangonzalez / jquery.pep.js

👟 Pep, a lightweight plugin for kinetic drag on mobile/desktop
http://pep.briangonzalez.org
1.3k stars 179 forks source link

mobile trigger keyboard on input focus, pep disables click events #45

Closed litenull closed 11 years ago

litenull commented 11 years ago

Hello,

Im doing a crosswords game, and im using pep to move the table around. I have inputs where you can enter the corresponding word. Its actually a mobile application.

I have a problem. I can move around the table just fine. But I cant focus on inputs. Can you give me a hand ? The game board is basically a table wrapped in a div on which i apply pep. I tried using shouldPreventDefault to false, but it works very weirdly on mobile browsers.

briangonzalez commented 11 years ago

I would do something like so:

http://codepen.io/briangonzalez/pen/857e124f16c37aa2cc54e58e2391a6d7

Does this work for you?

litenull commented 11 years ago

Works flawlessly. I changed the input[0] to event.originalEvent.target so the clicked el gets focused.

Thank you so much, love this plugin.

briangonzalez commented 11 years ago

Great, glad it worked.