Skip to content

Commit

Permalink
fix focusable prop
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Mar 7, 2023
1 parent cd93903 commit 6520062
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ const propTypes = {
const BaseQuickEmojiReactions = props => (
<View style={styles.quickReactionsContainer}>
{_.map(CONST.QUICK_REACTIONS, emoji => (
<Tooltip text={`:${emoji.name}:`} key={emoji.name}>

// Note: focus is handled by the Pressable component in EmojiReactionBubble
<Tooltip text={`:${emoji.name}:`} key={emoji.name} focusable={false}>
<EmojiReactionBubble
emojiName={emoji.name}
emojiCodes={[getPreferredEmojiCode(emoji, props.preferredSkinTone)]}
Expand Down
1 change: 1 addition & 0 deletions src/components/Tooltip/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class Tooltip extends PureComponent {
<View
ref={el => this.wrapperView = el}
onBlur={this.hideTooltip}
focusable={this.props.focusable}
>
{this.props.children}
</View>
Expand Down
4 changes: 4 additions & 0 deletions src/components/Tooltip/tooltipPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ const propTypes = {

/** Maximum number of lines to show in tooltip */
numberOfLines: PropTypes.number,

/** Accessibility prop. Sets the tabindex to 0 if true. Default is true. */
focusable: PropTypes.bool,
};

const defaultProps = {
Expand All @@ -42,6 +45,7 @@ const defaultProps = {
text: '',
maxWidth: variables.sideBarWidth,
numberOfLines: CONST.TOOLTIP_MAX_LINES,
focusable: true,
};

export {
Expand Down

0 comments on commit 6520062

Please sign in to comment.