Skip to content

Commit

Permalink
fix(TypeAheadDropdown): input select on focus now works in Safari (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChitlangeSahas authored Aug 17, 2022
1 parent 61ae043 commit ec9a625
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 6.1.1 (2022-08-17)

- [823](https://github.com/influxdata/clockface/pull/823): Typeahead Dropdown select text on focus works on all browsers

### 6.1.0 (2022-08-09)

- [820](https://github.com/influxdata/clockface/pull/820): Typeahead Dropdown scroll to selected item
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@influxdata/clockface",
"version": "6.1.0",
"version": "6.1.1",
"license": "MIT",
"main": "dist/index.js",
"style": "dist/index.css",
Expand Down
3 changes: 2 additions & 1 deletion src/Components/Dropdowns/Composed/TypeAheadDropDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ export const TypeAheadDropDown: FC<OwnProps> = ({

const selectAllTextInInput = (event?: ChangeEvent<HTMLInputElement>) => {
if (event) {
event.target.select()
const target = event.target
setTimeout(() => target.select(), 0)
}
}

Expand Down

0 comments on commit ec9a625

Please # to comment.