Fix bug: can't upload profile photo

The onInputChanged callback is using the event parameter to get the target DOM element. On #L72 the callback function was called manually, but no parameter was passed. I pass in an object that has a target attribute, so it can get the DOM element.
This commit is contained in:
h3yduck 2015-02-05 07:00:12 -08:00
parent 25f01db701
commit 29f5307cfd

View file

@ -69,7 +69,7 @@ module.exports = class AccountSettingsView extends CocoView
photoContainer.addClass('saving')
onSaved = (uploadingPath) =>
@$el.find('#photoURL').val(uploadingPath)
@onInputChanged() # cause for some reason editing the value doesn't trigger the jquery event
@onInputChanged({target: @$el.find('#photoURL')}) # 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)