Recently writing a mobile app with Cordova (PHONEGAP), the form is more complex and uses the Knockoutjs as the front-end MVVM framework for data binding.
But found that sometimes (in fact, every time) if you finally edit a value in input, and then directly point to Save the button (using the JQM tap event, the same as before directly with Touchend), you will find that the last focus of the control's value is not updated.
Guess because Ko's value binding defaults to updating the value in the view model when the control triggers a change event, but does not know why clicking on the Save button does not trigger the last input switch event.
The workaround is also simple to manually trigger the change of the current control in the response event of the Save button:
1:if (document.activeelement) {
2: $ (document.activeelement). Trigger ("Change");
3: }
This problem does not exist in the browser of the PC, so there is no discovery when using the Ripple simulator, but there is this problem on iOS and Android, and I don't know why ...
Knockoutjs sometimes unable to update control values on mobile devices