1
0
mirror of https://github.com/flarum/core.git synced 2025-06-26 04:34:45 +02:00

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 fdfc6c0de2
commit f9556d9d6a

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]);
});
}