Skip to content

Commit

Permalink
fix(ui): Handle Email dropdown in alert creator for Safari (#33741)
Browse files Browse the repository at this point in the history
Safari is disregarding autocomplete='off' and still showing the browser autocomplete for the select action field in the alerts creator. This is due to the first/default option being set as Email, so having an invisible character to break up the word seems to fix this. Seems to be an open issue with react-select and the other solutions mentioned here don't work for Safari JedWatson/react-select#3500.

FIXES WOR-1779
  • Loading branch information
mikellykels committed Apr 19, 2022
1 parent 6e57ffd commit d810fd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion static/app/views/alerts/incidentRules/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ export enum ActionType {
}

export const ActionLabel = {
[ActionType.EMAIL]: t('Email'),
// \u200B is needed because Safari disregards autocomplete="off". It's seeing "Email" and
// opening up the browser autocomplete for email. https://github.com/JedWatson/react-select/issues/3500
[ActionType.EMAIL]: t('Emai\u200Bl'),
[ActionType.SLACK]: t('Slack'),
[ActionType.PAGERDUTY]: t('Pagerduty'),
[ActionType.MSTEAMS]: t('MS Teams'),
Expand Down

0 comments on commit d810fd2

Please sign in to comment.