diff options
author | Jessica Stokes <hello@jessicastokes.net> | 2017-01-04 18:29:43 -0800 |
---|---|---|
committer | Jessica Stokes <hello@jessicastokes.net> | 2017-01-04 18:29:43 -0800 |
commit | 1da73ecadedf26c5f04dc2de3bb65349ffc52ab9 (patch) | |
tree | 59ed36ee9bdce575ed8db18449040de7a9b7825e /app/assets/javascripts/components/features | |
parent | 251b04298e826818ecb48c2fdf96a83649e14e93 (diff) |
Fix Command-enter tooting
metaKey is only set correctly on keyDown, not keyUp, so this swaps to using that
Diffstat (limited to 'app/assets/javascripts/components/features')
-rw-r--r-- | app/assets/javascripts/components/features/compose/components/compose_form.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/features/compose/components/compose_form.jsx b/app/assets/javascripts/components/features/compose/components/compose_form.jsx index 55f361b0b..412c29310 100644 --- a/app/assets/javascripts/components/features/compose/components/compose_form.jsx +++ b/app/assets/javascripts/components/features/compose/components/compose_form.jsx @@ -49,7 +49,7 @@ const ComposeForm = React.createClass({ this.props.onChange(e.target.value); }, - handleKeyUp (e) { + handleKeyDown (e) { if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) { this.props.onSubmit(); } @@ -115,7 +115,7 @@ const ComposeForm = React.createClass({ value={this.props.text} onChange={this.handleChange} suggestions={this.props.suggestions} - onKeyUp={this.handleKeyUp} + onKeyDown={this.handleKeyDown} onSuggestionsFetchRequested={this.onSuggestionsFetchRequested} onSuggestionsClearRequested={this.onSuggestionsClearRequested} onSuggestionSelected={this.onSuggestionSelected} |