Skip to content

Commit

Permalink
Merge pull request #12090 from MarkCSmith/issue11433-blue-outline
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham authored Nov 15, 2022
2 parents 585a9fc + b798307 commit 210903a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/components/EmojiPicker/EmojiPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ class EmojiPicker extends React.Component {
this.onEmojiSelected = onEmojiSelected;
this.emojiPopoverAnchor = emojiPopoverAnchor;

if (this.emojiPopoverAnchor) {
// Drop focus to avoid blue focus ring.
emojiPopoverAnchor.blur();
}

this.measureEmojiPopoverAnchorPosition().then((emojiPopoverAnchorPosition) => {
this.setState({isEmojiPickerVisible: true, emojiPopoverAnchorPosition});
});
Expand Down
7 changes: 6 additions & 1 deletion src/components/FloatingActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ class FloatingActionButton extends PureComponent {
return (
<Tooltip absolute text={this.props.translate('common.new')}>
<AnimatedPressable
ref={el => this.fabPressable = el}
accessibilityLabel={this.props.accessibilityLabel}
accessibilityRole={this.props.accessibilityRole}
onPress={this.props.onPress}
onPress={(e) => {
// Drop focus to avoid blue focus ring.
this.fabPressable.blur();
this.props.onPress(e);
}}
style={[
styles.floatingActionButton,
StyleUtils.getAnimatedFABStyle(rotate, backgroundColor),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ class BaseVideoChatButtonAndMenu extends Component {
>
<Tooltip text={this.props.translate('videoChatButtonAndMenu.tooltip')}>
<Pressable
ref={el => this.videoChatButton = el}
onPress={() => {
// Drop focus to avoid blue focus ring.
this.videoChatButton.blur();

// If this is the Concierge chat, we'll open the modal for requesting a setup call instead
if (this.props.isConcierge) {
Navigation.navigate(ROUTES.getRequestCallRoute(CONST.GUIDES_CALL_TASK_IDS.CONCIERGE_DM));
Expand Down
4 changes: 4 additions & 0 deletions src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,12 @@ class ReportActionCompose extends React.Component {
)}
<Tooltip text={this.props.translate('reportActionCompose.addAction')}>
<TouchableOpacity
ref={el => this.actionButton = el}
onPress={(e) => {
e.preventDefault();

// Drop focus to avoid blue focus ring.
this.actionButton.blur();
this.setMenuVisibility(true);
}}
style={styles.chatItemAttachButton}
Expand Down

0 comments on commit 210903a

Please sign in to comment.