diff --git a/src/components/DownloadButton.js b/src/components/DownloadButton.js index 2a3e16c..20a6494 100644 --- a/src/components/DownloadButton.js +++ b/src/components/DownloadButton.js @@ -1,6 +1,10 @@ import React from 'react' export default class DownloadButton extends React.Component { + constructor() { + super() + this.onClick = this.onClick.bind(this) + } onClick(e) { this.props.onClick(e) @@ -9,7 +13,7 @@ export default class DownloadButton extends React.Component { render() { return } diff --git a/src/components/DownloadPage.js b/src/components/DownloadPage.js index 826ffb1..8279246 100644 --- a/src/components/DownloadPage.js +++ b/src/components/DownloadPage.js @@ -17,6 +17,8 @@ export default class DownloadPage extends React.Component { this._onChange = () => { this.setState(DownloadStore.getState()) } + + this.downloadFile = this.downloadFile.bind(this) } componentDidMount() { @@ -43,7 +45,7 @@ export default class DownloadPage extends React.Component {

Peers: {this.state.peers} · Up: {formatSize(this.state.speedUp)} · Down: {formatSize(this.state.speedDown)}

- + diff --git a/src/components/DropZone.js b/src/components/DropZone.js index 33e3f99..538b447 100644 --- a/src/components/DropZone.js +++ b/src/components/DropZone.js @@ -5,6 +5,11 @@ export default class DropZone extends React.Component { constructor() { super() this.state = { focus: false } + + this.onDragEnter = this.onDragEnter.bind(this) + this.onDragLeave = this.onDragLeave.bind(this) + this.onDragOver = this.onDragOver.bind(this) + this.onDrop = this.onDrop.bind(this) } onDragEnter() { @@ -31,10 +36,10 @@ export default class DropZone extends React.Component { render() { return
+ onDragEnter={this.onDragEnter} + onDragLeave={this.onDragLeave} + onDragOver={this.onDragOver} + onDrop={this.onDrop}>