mirror of
https://github.com/spliit-app/spliit.git
synced 2026-03-07 12:56:12 +01:00
change onClick to onFocus, with a slight delay for safari (#144)
* change onClick to onFocus, with a slight delay for safari * typo * fix variable name * Fix style --------- Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
This commit is contained in:
@@ -326,7 +326,11 @@ export function ExpenseForm({
|
|||||||
onChange={(event) =>
|
onChange={(event) =>
|
||||||
onChange(enforceCurrencyPattern(event.target.value))
|
onChange(enforceCurrencyPattern(event.target.value))
|
||||||
}
|
}
|
||||||
onClick={(e) => e.currentTarget.select()}
|
onFocus={(e) => {
|
||||||
|
// we're adding a small delay to get around safaris issue with onMouseUp deselecting things again
|
||||||
|
const target = e.currentTarget
|
||||||
|
setTimeout(() => target.select(), 1)
|
||||||
|
}}
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|||||||
Reference in New Issue
Block a user