<commit_before>var React = require('react');

var ENTER_KEY = 13;
var FlickrSearch = React.createClass({

    keyPress: function(event) {
        if (event.which == ENTER_KEY) {
            var value = this.refs.searchItem.getDOMNode().value;
            //this.refs.searchItem.getDOMNode().value = '';
            this.props.handler(value);
        }

    },

    hover: function(event) {
        this.refs.searchItem.getDOMNode().focus();
        this.refs.searchItem.getDOMNode().select();
    },

    hoverOut: function(event) {
        this.refs.searchItem.getDOMNode().blur();
    },

    render: function() {

        var style = {
            marginRight: 5
        };
        var searchBtn = <div className="list-group-item" onMouseOver={this.hover} onMouseOut={this.hoverOut}>
                            <span className="label label-warning" style={style}>Search Flickr:</span>
                            <input type="text" ref="searchItem" placeholder="Search text" onKeyPress={this.keyPress}/>
                        </div>;

        return (
            <div>
                {searchBtn}
            </div>
        );
    }

});

module.exports = FlickrSearch;<commit_msg>removed blur event from search<commit_after>var React = require('react');

var ENTER_KEY = 13;
var FlickrSearch = React.createClass({

    keyPress: function(event) {
        if (event.which == ENTER_KEY) {
            var value = this.refs.searchItem.getDOMNode().value;
            //this.refs.searchItem.getDOMNode().value = '';
            this.props.handler(value);
        }

    },

    hover: function(event) {
        this.refs.searchItem.getDOMNode().focus();
        this.refs.searchItem.getDOMNode().select();
    },

    hoverOut: function(event) {
        //this.refs.searchItem.getDOMNode().blur();
    },

    render: function() {

        var style = {
            marginRight: 5
        };
        var searchBtn = <div className="list-group-item" onMouseOver={this.hover} onMouseOut={this.hoverOut}>
                            <span className="label label-warning" style={style}>Search Flickr:</span>
                            <input type="text" ref="searchItem" placeholder="Search text" onKeyPress={this.keyPress}/>
                        </div>;

        return (
            <div>
                {searchBtn}
            </div>
        );
    }

});

module.exports = FlickrSearch;
{'fraction_non_alphanumeric': 0.14029227557411272, 'fraction_numerical': 0.0025052192066805845, 'mean_word_length': 1.9183922046285018, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6519712', 'n_tokens_mistral': 710, 'n_tokens_neox': 667, 'n_words': 115}