Fix Open Torrent Address modal

Fixes a bug introduced in 0.14.0: cicking OK works, but hitting Enter doesn't do anything
This commit is contained in:
DC
2016-09-05 19:40:48 -07:00
parent d331bae548
commit e0be052df4

View File

@@ -11,6 +11,7 @@ module.exports = class OpenTorrentAddressModal extends React.Component {
<p><label>Enter torrent address or magnet link</label></p>
<div>
<TextField
id='torrent-address-field'
className='control'
ref={(c) => { this.torrentURL = c }}
fullWidth
@@ -31,7 +32,7 @@ module.exports = class OpenTorrentAddressModal extends React.Component {
}
function handleKeyDown (e) {
if (e.which === 13) this.handleOK() /* hit Enter to submit */
if (e.which === 13) handleOK.call(this) /* hit Enter to submit */
}
function handleOK () {