Commit 88b71458 88b714586aa16ffdc1da6159ac4ab36555e14472 by Lee Byrd

fire the 'input' event after setting input value

This is required to support angular.js apps.
If DOM elements in the browser responds to 
'oninput', the angular.js framework listens for 
this event as a cue to update data bindings.
1 parent 02ecf7e4
......@@ -694,10 +694,17 @@
out = 'Unsupported field type: ' + nodeName;
break;
}
// firing the `change` event
var changeEvent = document.createEvent("HTMLEvents");
changeEvent.initEvent('change', true, true);
field.dispatchEvent(changeEvent);
// firing the `input` event
var inputEvent = document.createEvent("HTMLEvents");
inputEvent.initEvent('input', true, true);
field.dispatchEvent(inputEvent);
// blur the field
try {
field.blur();
......