knockout textInput binding on number input field not updating on Microsoft Edge

Anand Srivastava1

New member
Dec 20, 2016
1
0
0
Visit site
I seem to have hit an Edge browser specific issue with number input fields and knockout textInput binding.

I have the latest edge version, namely: Microsoft Edge 38.14393.0.0; Microsoft EdgeHTML 14.14393

Until the anniversary update, the number input fields did not do anything with up/down arrows on Edge like they do on Chrome/Firefox. However, the latest version seems to have made some changes such that the visible value differs from what knockout has in the bound variable; when up/down arrows are used. Typed values reflect correctly.

Here is the jsfiddle; try to change the value using up/down arrows:

https://jsfiddle.net/nkkfmLmc/13/

Html:

Amount:
<input type="number" min="0" max="100" step="1" data-bind="textInput: amount" />
<br />
Current Amount $<span data-bind="text:amount()"></span>

JS:

function PersonViewModel(amount) {
this.amount = ko.observable(amount);
}

ko.applyBindings(new PersonViewModel(51.22));

The value updates correctly if the number is typed-in instead.

Any confirmation of the Edge issue or workaround(short of not using the number input type altogether) would be appreciated .
 

Members online

Forum statistics

Threads
323,321
Messages
2,243,631
Members
428,060
Latest member
oliveeAria