mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix onChange for File Input
Makes sure that `onChange` fires for file inputs.
This commit is contained in:
committed by
Paul O’Shannessy
parent
43930455de
commit
cf926338bf
@@ -51,7 +51,10 @@ var activeElementValueProp = null;
|
||||
* SECTION: handle `change` event
|
||||
*/
|
||||
var shouldUseChangeEvent = function(elem) {
|
||||
return elem.nodeName === 'SELECT';
|
||||
return (
|
||||
elem.nodeName === 'SELECT' ||
|
||||
(elem.nodeName === 'INPUT' && elem.type === 'file')
|
||||
);
|
||||
};
|
||||
|
||||
var doesChangeEventBubble = false;
|
||||
|
||||
Reference in New Issue
Block a user