mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-07 10:34:46 -04:00
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:
parent
25f01db701
commit
29f5307cfd
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() # 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)
|
||||
|
|
Loading…
Add table
Reference in a new issue