Fix for iOS7 keypress bug

Fix for iOS7 keypress bug.