aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/header.js
diff options
context:
space:
mode:
authorJason <jason.daurus@gmail.com>2016-03-02 22:37:32 +0800
committerJason <jason.daurus@gmail.com>2016-03-02 22:37:32 +0800
commit1d002182e318be64190c4616ac4931e98feb31eb (patch)
tree5a1791ac7c854f0008dcdcec6fcdfc11737440c1 /web/src/js/components/header.js
parentfab9dad940d6db15bb671a557fd51d1241e4ecbe (diff)
downloadmitmproxy-1d002182e318be64190c4616ac4931e98feb31eb.tar.gz
mitmproxy-1d002182e318be64190c4616ac4931e98feb31eb.tar.bz2
mitmproxy-1d002182e318be64190c4616ac4931e98feb31eb.zip
[web] remove common.ChildFocus
Diffstat (limited to 'web/src/js/components/header.js')
-rw-r--r--web/src/js/components/header.js8
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();