0

I need to run a function every time a key is pressed. This works fine for computers but on an iOS Device it doesn't seem to register. The html element is

<input id="word" type="text" value="" onkeyup="game.check_score()"/>

Any ideas?

Matteo Gobbi
  • 17,697
  • 3
  • 27
  • 41
mark D
  • 38
  • 7
  • This appears to work for me on the iOS Simulator. Have you tried onkeypress or onkeydown? – jheth Aug 25 '14 at 23:22
  • They worked in this iOS Simulator but not on an iPad. (iPad 2 iOS 7) – mark D Aug 26 '14 at 00:24
  • Try debugging with Safari Web Inspector. Check that the Javascript is actually loaded. Step debug and check the error console. Setup instructions: http://moduscreate.com/enable-remote-web-inspector-in-ios-6/ – HoffZ Aug 27 '14 at 07:11
  • One thing that might be happening is if you have multiple scripts/plugins triggering at keyup, they might be overriding each other. You want to debug remotely and then check the JavaScript Events tab under Timelines on the debug console – nikjohn Nov 12 '14 at 10:40

0 Answers0