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:
@@ -11,6 +11,7 @@ module.exports = class OpenTorrentAddressModal extends React.Component {
|
|||||||
<p><label>Enter torrent address or magnet link</label></p>
|
<p><label>Enter torrent address or magnet link</label></p>
|
||||||
<div>
|
<div>
|
||||||
<TextField
|
<TextField
|
||||||
|
id='torrent-address-field'
|
||||||
className='control'
|
className='control'
|
||||||
ref={(c) => { this.torrentURL = c }}
|
ref={(c) => { this.torrentURL = c }}
|
||||||
fullWidth
|
fullWidth
|
||||||
@@ -31,7 +32,7 @@ module.exports = class OpenTorrentAddressModal extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleKeyDown (e) {
|
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 () {
|
function handleOK () {
|
||||||
|
|||||||
Reference in New Issue
Block a user