Skip to content

Commit

Permalink
Merge pull request #382 from mitodl/gs/fix_autocomplete
Browse files Browse the repository at this point in the history
Removed AutoComplete onBlur handling when user has clicked a menu item
  • Loading branch information
George Schneeloch committed May 23, 2016
2 parents e575214 + 82239c1 commit fd445dd
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 fd445dd

Please sign in to comment.