I have some inputs that I'm trying fill using a Chrome snippet. The inputs that are bound to the component model using [(ngModel)]="myProperty"
work great. Two of the inputs, however, only update the component model on blur
(I want one-way template to model binding, which does not appear to exist).
For example: <input id="myId" (blur)="blurs = blurs + 1">
The following script enters the text just fine but does not trigger the blur, and therefore does not update the model:
document.querySelector('#myId').select();
document.execCommand('insertText', false, 'some text');
document.getElementById("myId").focus();
document.getElementById("myId").blur();
I've tried adding a tabindex
with no success.
Any ideas?