Revert "New composer: show markdown legend on focus"

This commit is contained in:
Bruno Windels 2019-09-03 08:27:45 +00:00 committed by GitHub
parent 71e13842b8
commit 1063da0ed1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 58 deletions

View file

@ -226,21 +226,15 @@ export default class BasicMessageEditor extends React.Component {
return this.getCaret().offset === this._lastTextLength;
}
_onBlur = (event) => {
_onBlur = () => {
document.removeEventListener("selectionchange", this._onSelectionChange);
if (this.props.onBlur) {
this.props.onBlur(event);
}
}
_onFocus = (event) => {
_onFocus = () => {
document.addEventListener("selectionchange", this._onSelectionChange);
// force to recalculate
this._lastSelection = null;
this._refreshLastCaretIfNeeded();
if (this.props.onFocus) {
this.props.onFocus(event);
}
}
_onSelectionChange = () => {