From 17db4cc913ba66465fb298ea7bc79bca838ceb3a Mon Sep 17 00:00:00 2001 From: Dimitri Wijesinghe Date: Wed, 13 Feb 2019 14:56:42 -0500 Subject: [PATCH] Fixed bug where selecting the first emoji search result with the ENTER key ignores skin-tone selection. --- src/components/picker/nimble-picker.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/picker/nimble-picker.js b/src/components/picker/nimble-picker.js index 24c0ff4..da79a4a 100644 --- a/src/components/picker/nimble-picker.js +++ b/src/components/picker/nimble-picker.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types' import * as icons from '../../svgs' import store from '../../utils/store' import frequently from '../../utils/frequently' -import { deepMerge, measureScrollbar } from '../../utils' +import { deepMerge, measureScrollbar, getSanitizedData } from '../../utils' import { uncompress } from '../../utils/data' import { PickerPropTypes, PickerDefaultProps } from '../../utils/shared-props' @@ -396,7 +396,12 @@ export default class NimblePicker extends React.PureComponent { if ( this.SEARCH_CATEGORY.emojis && - (emoji = this.SEARCH_CATEGORY.emojis[0]) + (emoji = getSanitizedData( + this.SEARCH_CATEGORY.emojis[0], + this.state.skin, + this.props.set, + this.props.data, + )) ) { this.handleEmojiSelect(emoji) }