fix changeavatar to avoid duplicate click on label

This commit is contained in:
Matthew Hodgson 2016-01-15 16:33:34 +00:00
parent 293f5c7120
commit f476150591
2 changed files with 9 additions and 5 deletions

View file

@ -233,9 +233,11 @@ module.exports = React.createClass({
})}
</div>
<div className="mx_UserSettings_avatarPicker" onClick={ this.onAvatarPickerClick } >
<div className="mx_UserSettings_avatarPicker">
<div onClick={ this.onAvatarPickerClick }>
<ChangeAvatar ref="changeAvatar" initialAvatarUrl={avatarUrl}
showUploadSection={false} className="mx_UserSettings_avatarPicker_img"/>
</div>
<div className="mx_UserSettings_avatarPicker_edit">
<label htmlFor="avatarInput" ref="file_label">
<img src="img/camera.svg"

View file

@ -245,8 +245,10 @@ module.exports = React.createClass({
if (this.props.room) {
if (can_set_room_avatar) {
roomAvatar = (
<div className="mx_RoomHeader_avatarPicker" onClick={ this.onAvatarPickerClick }>
<div className="mx_RoomHeader_avatarPicker">
<div onClick={ this.onAvatarPickerClick }>
<ChangeAvatar ref="changeAvatar" room={this.props.room} showUploadSection={false} width={48} height={48} />
</div>
<div className="mx_RoomHeader_avatarPicker_edit">
<label htmlFor="avatarInput" ref="file_label">
<img src="img/camera.svg"