mirror of https://github.com/vector-im/riot-web
Merge pull request #4265 from ThobyV/thobyv/hide-formatbar-onEnter-highlighted-message
Fix formatbar not hidden on highlighted message sentpull/21833/head
commit
8521ed1a45
|
@ -149,14 +149,17 @@ export default class BasicMessageEditor extends React.Component {
|
|||
const position = selection.end || selection;
|
||||
this._setLastCaretFromPosition(position);
|
||||
}
|
||||
const {isEmpty} = this.props.model;
|
||||
if (this.props.placeholder) {
|
||||
const {isEmpty} = this.props.model;
|
||||
if (isEmpty) {
|
||||
this._showPlaceholder();
|
||||
} else {
|
||||
this._hidePlaceholder();
|
||||
}
|
||||
}
|
||||
if (isEmpty) {
|
||||
this._formatBarRef.hide();
|
||||
}
|
||||
this.setState({autoComplete: this.props.model.autoComplete});
|
||||
this.historyManager.tryPush(this.props.model, selection, inputType, diff);
|
||||
TypingStore.sharedInstance().setSelfTyping(this.props.room.roomId, !this.props.model.isEmpty);
|
||||
|
|
Loading…
Reference in New Issue