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/header.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/header.js')
-rw-r--r-- | web/src/js/components/header.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/web/src/js/components/header.js b/web/src/js/components/header.js index 3833a6ee..96b522f0 100644 --- a/web/src/js/components/header.js +++ b/web/src/js/components/header.js @@ -4,7 +4,7 @@ import $ from "jquery"; import Filt from "../filt/filt.js"; import {Key} from "../utils.js"; -import {Router, SettingsState, ChildFocus} from "./common.js"; +import {Router, SettingsState} from "./common.js"; import {SettingsActions, FlowActions} from "../actions.js"; import {Query} from "../actions.js"; @@ -51,7 +51,9 @@ var FilterDocs = React.createClass({ } }); var FilterInput = React.createClass({ - mixins: [ChildFocus], + contextTypes: { + returnFocus: React.PropTypes.func + }, getInitialState: function () { // Consider both focus and mouseover for showing/hiding the tooltip, // because onBlur of the input is triggered before the click on the tooltip @@ -118,7 +120,7 @@ var FilterInput = React.createClass({ }, blur: function () { ReactDOM.findDOMNode(this.refs.input).blur(); - this.returnFocus(); + this.context.returnFocus(); }, select: function () { ReactDOM.findDOMNode(this.refs.input).select(); |