add autoFocus to MessageComposer's textarea, which generally makes the world a better place. We could probably kill all the focus_composer dispatches too, but haven't got time to check that right now

This commit is contained in:
Matthew Hodgson 2016-03-17 17:29:48 +00:00
parent 092c416a89
commit 57ffc2d2e2

View file

@ -517,7 +517,7 @@ module.exports = React.createClass({
<MemberAvatar member={me} width={24} height={24} /> <MemberAvatar member={me} width={24} height={24} />
</div> </div>
<div className="mx_MessageComposer_input" onClick={ this.onInputClick }> <div className="mx_MessageComposer_input" onClick={ this.onInputClick }>
<textarea ref="textarea" rows="1" onKeyDown={this.onKeyDown} onKeyUp={this.onKeyUp} placeholder="Type a message..." /> <textarea autoFocus ref="textarea" rows="1" onKeyDown={this.onKeyDown} onKeyUp={this.onKeyUp} placeholder="Type a message..." />
</div> </div>
<div className="mx_MessageComposer_upload" onClick={this.onUploadClick} title="Upload file"> <div className="mx_MessageComposer_upload" onClick={this.onUploadClick} title="Upload file">
<TintableSvg src="img/upload.svg" width="19" height="24"/> <TintableSvg src="img/upload.svg" width="19" height="24"/>