2

I'm trying to handle keypress event in Windows Phone's browser via JavaScript. Here is working example: http://jsfiddle.net/alex_myronov/c5n4C/2/. But as I change input value the handler is not triggered. It triggered only in case input lost focus. Does someone know how to deal with it?

alex.mironov
  • 2,834
  • 6
  • 27
  • 41

1 Answers1

0

Try the keydown event as opposed to keypress, I believe keypress isn't consistently implemented.

<input data-bind="event: {keydown: changeStatus}, valueUpdate: 'afterkeydown'"></input>

For more information on the difference between the two read here: What's the difference between KeyDown and KeyPress in .NET?

Community
  • 1
  • 1
TysonWolker
  • 436
  • 2
  • 9