mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 09:53:27 +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
3f10eeaa88
commit
c48ff264e8
5
framework/core/js/forum/dist/app.js
vendored
5
framework/core/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