fix(input): bind inputs to the 'input' event

The input event is fired on all non-ie browsers whenever the contents of an input
field changes. This means that we now support cut&paste via mouse which
was previously unsupported.

IE8 and older don't support this events and IE9 has a problematic
support for it, so we can't rely solely on this event and drop keydown
and change events.
This commit is contained in:
bartes
2011-11-18 20:10:04 +01:00
committed by Igor Minar
parent c28662d28d
commit 0c534644bc
2 changed files with 9 additions and 2 deletions

View File

@@ -817,7 +817,7 @@ angularWidget('input', function(inputElement){
inputElement.val(widget.$viewValue || '');
};
inputElement.bind('keydown change', function(event){
inputElement.bind('keydown change input', function(event) {
var key = event.keyCode;
if (/*command*/ key != 91 &&
/*modifiers*/ !(15 < key && key < 19) &&