diff options
author | Jason <jason.daurus@gmail.com> | 2016-07-05 22:28:00 +0800 |
---|---|---|
committer | Jason <jason.daurus@gmail.com> | 2016-07-05 22:28:00 +0800 |
commit | af2319aa6458a92caec2c09386fdf251502c03cb (patch) | |
tree | c0b5a0efff2ced7ab68849f4a983bba9b483957a /web/src/js/components/ValueEditor.jsx | |
parent | 9bfde2a3ae7fada86911dc96f1ed35a21aae40c3 (diff) | |
download | mitmproxy-af2319aa6458a92caec2c09386fdf251502c03cb.tar.gz mitmproxy-af2319aa6458a92caec2c09386fdf251502c03cb.tar.bz2 mitmproxy-af2319aa6458a92caec2c09386fdf251502c03cb.zip |
[web] listen to window.onKeyDown
Diffstat (limited to 'web/src/js/components/ValueEditor.jsx')
-rwxr-xr-x | web/src/js/components/ValueEditor.jsx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/web/src/js/components/ValueEditor.jsx b/web/src/js/components/ValueEditor.jsx index 0316924f..5f1bf2dc 100755 --- a/web/src/js/components/ValueEditor.jsx +++ b/web/src/js/components/ValueEditor.jsx @@ -4,27 +4,17 @@ import ValidateEditor from './ValueEditor/ValidateEditor' export default class ValueEditor extends Component { - static contextTypes = { - returnFocus: PropTypes.func, - } - static propTypes = { content: PropTypes.string.isRequired, onDone: PropTypes.func.isRequired, inline: PropTypes.bool, } - constructor(props) { - super(props) - this.focus = this.focus.bind(this) - } - render() { - var tag = this.props.inline ? "span" : 'div' + var tag = this.props.inline ? 'span' : 'div' return ( <ValidateEditor {...this.props} - onStop={() => this.context.returnFocus()} tag={tag} /> ) |