diff options
author | Jason <jason.daurus@gmail.com> | 2016-06-17 07:57:06 +0800 |
---|---|---|
committer | Jason <jason.daurus@gmail.com> | 2016-06-17 07:57:06 +0800 |
commit | 034287edcf00eb734cb67e62de58c3bfebf6bb44 (patch) | |
tree | 198264689fc77b8fe8c54a5c95114da7ef5a1651 /web | |
parent | 7a78970d10ab2dfc9b86dd30a76fb1513f43dd35 (diff) | |
download | mitmproxy-034287edcf00eb734cb67e62de58c3bfebf6bb44.tar.gz mitmproxy-034287edcf00eb734cb67e62de58c3bfebf6bb44.tar.bz2 mitmproxy-034287edcf00eb734cb67e62de58c3bfebf6bb44.zip |
[web] clean up
Diffstat (limited to 'web')
-rwxr-xr-x | web/src/js/components/Prompt.jsx | 4 | ||||
-rw-r--r-- | web/src/js/components/ProxyApp.jsx | 7 |
2 files changed, 2 insertions, 9 deletions
diff --git a/web/src/js/components/Prompt.jsx b/web/src/js/components/Prompt.jsx index 878aae29..6b19b3b3 100755 --- a/web/src/js/components/Prompt.jsx +++ b/web/src/js/components/Prompt.jsx @@ -14,10 +14,6 @@ Prompt.propTypes = { prompt: PropTypes.string, } -Prompt.componentDidMount = function() { - ReactDOM.findDOMNode(this).focus() -} - export default function Prompt({ prompt, done, options }, context) { const opts = [] diff --git a/web/src/js/components/ProxyApp.jsx b/web/src/js/components/ProxyApp.jsx index 967cc921..c458639d 100644 --- a/web/src/js/components/ProxyApp.jsx +++ b/web/src/js/components/ProxyApp.jsx @@ -13,7 +13,6 @@ class ProxyAppMain extends Component { static childContextTypes = { returnFocus: PropTypes.func.isRequired, - location: PropTypes.object.isRequired, } static contextTypes = { @@ -89,10 +88,7 @@ class ProxyAppMain extends Component { * @todo use props */ getChildContext() { - return { - returnFocus: this.focus, - location: this.props.location - } + return { returnFocus: this.focus } } /** @@ -106,6 +102,7 @@ class ProxyAppMain extends Component { /** * @todo move to actions + * @todo bind on window */ onKeyDown(e) { let name = null |