Update AvatarEditor.js onchange to oninput (#1570)

onchange does not work in IE11 and other IE browsers. This change works with all modern browsers as well.
This commit is contained in:
D Mata 2020-02-10 14:54:41 -08:00 committed by GitHub
parent 1129e1333a
commit 9ac54429d0

View File

@ -150,7 +150,7 @@ export default class AvatarEditor extends Component {
const user = this.props.user;
const $input = $('<input type="file">');
$input.appendTo('body').hide().click().on('change', e => {
$input.appendTo('body').hide().click().on('input', e => {
this.upload($(e.target)[0].files[0]);
});
}