From 93a526f7ed5464e18e11137f798d09c0561b16a8 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Mon, 9 Jan 2017 19:32:27 +0500 Subject: PLT-5179 - Fixing modal overflow for autocomplete (#5002) * PLT-5179 - Fixing modal overflow for autocomplete * PLT-5171 - Fixing search bar popover behaviour --- webapp/components/suggestion/suggestion_box.jsx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'webapp/components/suggestion') diff --git a/webapp/components/suggestion/suggestion_box.jsx b/webapp/components/suggestion/suggestion_box.jsx index b3f9843c6..fb55b0588 100644 --- a/webapp/components/suggestion/suggestion_box.jsx +++ b/webapp/components/suggestion/suggestion_box.jsx @@ -64,6 +64,7 @@ export default class SuggestionBox extends React.Component { // Delay this slightly so that we don't clear the suggestions before we run click handlers on SuggestionList GlobalActions.emitClearSuggestions(this.suggestionId); }, 100); + this.props.onBlur(); } handleChange(e) { @@ -272,6 +273,7 @@ SuggestionBox.propTypes = { renderDividers: React.PropTypes.bool, // explicitly name any input event handlers we override and need to manually call + onBlur: React.PropTypes.func, onChange: React.PropTypes.func, onKeyDown: React.PropTypes.func, onItemSelected: React.PropTypes.func -- cgit v1.2.3-1-g7c22 From 2f9b56eb3a3efc90b90d727303418c6c24ac2198 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Mon, 9 Jan 2017 14:22:21 -0500 Subject: Fixed onBlur being called when not given as a prop (#5024) --- webapp/components/suggestion/suggestion_box.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'webapp/components/suggestion') diff --git a/webapp/components/suggestion/suggestion_box.jsx b/webapp/components/suggestion/suggestion_box.jsx index fb55b0588..e9f7c3699 100644 --- a/webapp/components/suggestion/suggestion_box.jsx +++ b/webapp/components/suggestion/suggestion_box.jsx @@ -64,7 +64,10 @@ export default class SuggestionBox extends React.Component { // Delay this slightly so that we don't clear the suggestions before we run click handlers on SuggestionList GlobalActions.emitClearSuggestions(this.suggestionId); }, 100); - this.props.onBlur(); + + if (this.props.onBlur) { + this.props.onBlur(); + } } handleChange(e) { -- cgit v1.2.3-1-g7c22