1
0
mirror of https://github.com/flarum/core.git synced 2025-07-28 04:00:40 +02:00

Refactor Composer rendering for smoother animations

Also fixes a couple of miscellaneous bugs:
- Minimise the Composer when clicking the preview button in full-screen mode on desktop.
- Minimise the Composer when clicking the link to the discussion/post in the header on mobile/full-screen mode.
This commit is contained in:
Toby Zerner
2016-02-26 12:49:49 +10:30
parent 5390187a4f
commit 82fc4dd483
6 changed files with 303 additions and 295 deletions

View File

@@ -19,7 +19,7 @@ export default class TextEditor extends Component {
/**
* The value of the textarea.
*
* @type {[type]}
* @type {String}
*/
this.value = m.prop(this.props.value || '');
}
@@ -27,14 +27,14 @@ export default class TextEditor extends Component {
view() {
return (
<div className="TextEditor">
<textarea className="FormControl TextEditor-flexible"
<textarea className="FormControl Composer-flexible"
config={this.configTextarea.bind(this)}
oninput={m.withAttr('value', this.oninput.bind(this))}
placeholder={this.props.placeholder || ''}
disabled={!!this.props.disabled}
value={this.value()}/>
<ul className="TextEditor-controls">
<ul className="TextEditor-controls Composer-footer">
{listItems(this.controlItems().toArray())}
</ul>
</div>