mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Fix bug: cannot upload profile picture
In the code before, onInputChanged function was called manually, but the parameter was not passed. I think it's better to trigger the event, than calling the callback function of the event.
This commit is contained in:
parent
29f5307cfd
commit
3221f71527
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ module.exports = class AccountSettingsView extends CocoView
|
|||
photoContainer.addClass('saving')
|
||||
onSaved = (uploadingPath) =>
|
||||
@$el.find('#photoURL').val(uploadingPath)
|
||||
@onInputChanged({target: @$el.find('#photoURL')}) # cause for some reason editing the value doesn't trigger the jquery event
|
||||
@$el.find('#photoURL').trigger('change') # cause for some reason editing the value doesn't trigger the jquery event
|
||||
me.set('photoURL', uploadingPath)
|
||||
photoContainer.removeClass('saving').attr('src', me.getPhotoURL(photoContainer.width()))
|
||||
filepicker.pick {mimetypes: 'image/*'}, @onImageChosen(onSaving, onSaved)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue