diff options
author | Jason <jason.daurus@gmail.com> | 2016-03-02 22:37:32 +0800 |
---|---|---|
committer | Jason <jason.daurus@gmail.com> | 2016-03-02 22:37:32 +0800 |
commit | 1d002182e318be64190c4616ac4931e98feb31eb (patch) | |
tree | 5a1791ac7c854f0008dcdcec6fcdfc11737440c1 /web/src/js/components/prompt.js | |
parent | fab9dad940d6db15bb671a557fd51d1241e4ecbe (diff) | |
download | mitmproxy-1d002182e318be64190c4616ac4931e98feb31eb.tar.gz mitmproxy-1d002182e318be64190c4616ac4931e98feb31eb.tar.bz2 mitmproxy-1d002182e318be64190c4616ac4931e98feb31eb.zip |
[web] remove common.ChildFocus
Diffstat (limited to 'web/src/js/components/prompt.js')
-rw-r--r-- | web/src/js/components/prompt.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web/src/js/components/prompt.js b/web/src/js/components/prompt.js index 7b398038..e324f7d4 100644 --- a/web/src/js/components/prompt.js +++ b/web/src/js/components/prompt.js @@ -3,10 +3,11 @@ import ReactDOM from 'react-dom'; import _ from "lodash"; import {Key} from "../utils.js"; -import {ChildFocus} from "./common.js" var Prompt = React.createClass({ - mixins: [ChildFocus], + contextTypes: { + returnFocus: React.PropTypes.func + }, propTypes: { options: React.PropTypes.array.isRequired, done: React.PropTypes.func.isRequired, @@ -35,7 +36,7 @@ var Prompt = React.createClass({ }, done: function (ret) { this.props.done(ret); - this.returnFocus(); + this.context.returnFocus(); }, getOptions: function () { var opts = []; |