mirror of
https://github.com/flarum/framework.git
synced 2025-03-03 21:21:45 +08:00
Prevent reverting editable user bio on click
Turns out the click handler was bound to the surrounding element rather than the one that wraps the rendered bio when it is not being edited. Fixes #1145.
This commit is contained in:
parent
2f714a01ed
commit
2140619c0b
5
js/forum/dist/app.js
vendored
5
js/forum/dist/app.js
vendored
@ -28539,7 +28539,7 @@ System.register('flarum/components/UserBio', ['flarum/Component', 'flarum/compon
|
||||
|
||||
content = m(
|
||||
'div',
|
||||
{ className: 'UserBio-content' },
|
||||
{ className: 'UserBio-content', onclick: this.edit.bind(this) },
|
||||
subContent
|
||||
);
|
||||
}
|
||||
@ -28549,8 +28549,7 @@ System.register('flarum/components/UserBio', ['flarum/Component', 'flarum/compon
|
||||
{ className: 'UserBio ' + classList({
|
||||
editable: this.props.editable,
|
||||
editing: this.editing
|
||||
}),
|
||||
onclick: this.edit.bind(this) },
|
||||
}) },
|
||||
content
|
||||
);
|
||||
}
|
||||
|
@ -45,15 +45,14 @@ export default class UserBio extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
content = <div className="UserBio-content">{subContent}</div>;
|
||||
content = <div className="UserBio-content" onclick={this.edit.bind(this)}>{subContent}</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={'UserBio ' + classList({
|
||||
editable: this.props.editable,
|
||||
editing: this.editing
|
||||
})}
|
||||
onclick={this.edit.bind(this)}>
|
||||
})}>
|
||||
{content}
|
||||
</div>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user