Skip to content

Commit

Permalink
Removed AutoComplete onBlur handling when user has clicked a menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
George Schneeloch committed May 23, 2016
1 parent eccfb1c commit b8b7670
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions static/js/components/AutoComplete.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// copied from https://raw.githubusercontent.com/callemall/material-ui/master/src/AutoComplete/AutoComplete.js
/* eslint-disable indent */
/* eslint-disable indent, max-len */
// adapted from https://github.com/callemall/material-ui/blob/8e80a35e8d2cdb410c3727333e8518cadc08783b/src/AutoComplete/AutoComplete.js
import React, {Component, PropTypes} from 'react';
import ReactDOM from 'react-dom';
import keycode from 'keycode';
Expand Down Expand Up @@ -332,7 +332,7 @@ class AutoComplete extends Component {
this.close();
}

if (this.props.onBlur && !this.state.skipFocusHandler) {
if (this.props.onBlur && !this.state.skipFocusHandler && this.timerTouchTapCloseId === null) {
this.props.onBlur(event);
}
this.setState({ skipFocusHandler: false });
Expand Down

0 comments on commit b8b7670

Please sign in to comment.