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 @@ ...@@ -694,10 +694,17 @@
694 out = 'Unsupported field type: ' + nodeName; 694 out = 'Unsupported field type: ' + nodeName;
695 break; 695 break;
696 } 696 }
697
697 // firing the `change` event 698 // firing the `change` event
698 var changeEvent = document.createEvent("HTMLEvents"); 699 var changeEvent = document.createEvent("HTMLEvents");
699 changeEvent.initEvent('change', true, true); 700 changeEvent.initEvent('change', true, true);
700 field.dispatchEvent(changeEvent); 701 field.dispatchEvent(changeEvent);
702
703 // firing the `input` event
704 var inputEvent = document.createEvent("HTMLEvents");
705 inputEvent.initEvent('input', true, true);
706 field.dispatchEvent(inputEvent);
707
701 // blur the field 708 // blur the field
702 try { 709 try {
703 field.blur(); 710 field.blur();
......