diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-03-05 13:20:43 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-03-05 13:20:43 +0100 |
commit | 34d19cf12e72a50b1d2e6fd1977c559ed9a80068 (patch) | |
tree | c15a367b92aabf066d1cae681eeeebdb4351a5ff /web/src/js/components/prompt.js | |
parent | f59770e949854f8a246ad41fc7beca7d54505004 (diff) | |
parent | 1d002182e318be64190c4616ac4931e98feb31eb (diff) | |
download | mitmproxy-34d19cf12e72a50b1d2e6fd1977c559ed9a80068.tar.gz mitmproxy-34d19cf12e72a50b1d2e6fd1977c559ed9a80068.tar.bz2 mitmproxy-34d19cf12e72a50b1d2e6fd1977c559ed9a80068.zip |
Merge pull request #994 from gzzhanghao/common
[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 = []; |