You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-23 21:02:09 +03:00
focus message composer when window gets focus
This commit is contained in:
@@ -42,6 +42,7 @@ module.exports = {
|
||||
}
|
||||
this.focusComposer = false;
|
||||
document.addEventListener("keydown", this.onKeyDown);
|
||||
window.addEventListener("focus", this.onFocus);
|
||||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
@@ -127,6 +128,10 @@ module.exports = {
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onFocus: function(ev) {
|
||||
dis.dispatch({action: 'focus_composer'});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user