diff --git a/src/pages/SearchPage.js b/src/pages/SearchPage.js index 564e0181679c..7244c9460a34 100755 --- a/src/pages/SearchPage.js +++ b/src/pages/SearchPage.js @@ -128,7 +128,7 @@ class SearchPage extends Component { } = getSearchOptions( this.props.reports, this.props.personalDetails, - this.state.searchValue, + this.state.searchValue.trim(), this.props.betas, ); this.setState({ diff --git a/src/pages/home/report/EmojiPickerMenu/index.js b/src/pages/home/report/EmojiPickerMenu/index.js index 044abc87a2cc..9ac5b2b2a253 100755 --- a/src/pages/home/report/EmojiPickerMenu/index.js +++ b/src/pages/home/report/EmojiPickerMenu/index.js @@ -274,7 +274,7 @@ class EmojiPickerMenu extends Component { * @param {String} searchTerm */ filterEmojis(searchTerm) { - const normalizedSearchTerm = searchTerm.toLowerCase(); + const normalizedSearchTerm = searchTerm.toLowerCase().trim(); if (normalizedSearchTerm === '') { // There are no headers when searching, so we need to re-make them sticky when there is no search term this.setState({ diff --git a/src/pages/settings/Profile/ProfilePage.js b/src/pages/settings/Profile/ProfilePage.js index df883255c03a..c8d7e5ba0b09 100755 --- a/src/pages/settings/Profile/ProfilePage.js +++ b/src/pages/settings/Profile/ProfilePage.js @@ -193,8 +193,8 @@ class ProfilePage extends Component { && this.props.myPersonalDetails.pronouns === this.state.selfSelectedPronouns); // Disables button if none of the form values have changed - const isButtonDisabled = (this.props.myPersonalDetails.firstName === this.state.firstName) - && (this.props.myPersonalDetails.lastName === this.state.lastName) + const isButtonDisabled = (this.props.myPersonalDetails.firstName === this.state.firstName.trim()) + && (this.props.myPersonalDetails.lastName === this.state.lastName.trim()) && (this.props.myPersonalDetails.timezone.selected === this.state.selectedTimezone) && (this.props.myPersonalDetails.timezone.automatic === this.state.isAutomaticTimezone) && arePronounsUnchanged;