Skip to content

Commit e81aee5

Browse files
cori-hudsonYour Name
authored andcommitted
fix: don't show colons on android (#23786)
* fix: don't show colons on android * fix: add comment with issue
1 parent c47a50e commit e81aee5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

shared/teams/emojis/common.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ export class AliasInput extends React.PureComponent<AliasInputProps, {}> {
4242
error={!!this.props.error}
4343
disabled={this.props.disabled}
4444
textType={Styles.isMobile ? 'BodySemibold' : 'Body'}
45-
value={`:${this.props.alias}:`}
45+
// android has issues with setSelection that make including colons a bad experience
46+
// see https://keybase.atlassian.net/browse/TRIAGE-2680
47+
value={Styles.isAndroid ? this.props.alias : `:${this.props.alias}:`}
4648
containerStyle={Styles.collapseStyles([
4749
styles.aliasInput,
4850
!this.props.small && styles.aliasInputLarge,
@@ -52,7 +54,8 @@ export class AliasInput extends React.PureComponent<AliasInputProps, {}> {
5254
this.props.onChangeAlias(newText.replace(/[^a-zA-Z0-9-_+]/g, ''))
5355
}
5456
onEnterKeyDown={this.props.onEnterKeyDown}
55-
onFocus={this.onFocus}
57+
// TODO: remove android exception when https://keybase.atlassian.net/browse/TRIAGE-2680 fixed
58+
onFocus={Styles.isAndroid ? undefined : this.onFocus}
5659
/>
5760
{this.props.onRemove && (
5861
<Kb.ClickableBox onClick={this.props.onRemove} style={styles.removeBox}>

0 commit comments

Comments
 (0)