This commit is contained in:
the-djmaze 2024-09-16 14:25:09 +02:00
parent 6f4f6bfd03
commit e0236ea52d
4 changed files with 11 additions and 4 deletions

View file

@ -51,6 +51,7 @@ ko.utils = {
: node => node.cloneNode(true)),
setDomNodeChildren: (domNode, childNodes) => {
// domNode.replaceChildren(...childNodes);
ko.utils.emptyDomNode(domNode);
childNodes && domNode.append(...childNodes);
},
@ -2821,7 +2822,7 @@ ko.bindingHandlers['textInput'] = {
elementValueBeforeEvent = timeoutHandle = undefined;
var elementValue = element.value;
if (previousElementValue !== elementValue) {
if (element.checkValidity() && previousElementValue !== elementValue) {
// Provide a way for tests to know exactly which event was processed
previousElementValue = elementValue;
ko.expressionRewriting.writeValueToProperty(valueAccessor(), allBindings, 'textInput', elementValue);