|
|
@ -84,15 +84,15 @@ const submitCurrency = () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const onBlur = () => { |
|
|
|
const onBlur = () => { |
|
|
|
// triggered by events like forcus-out / pressing enter |
|
|
|
// triggered by events like focus-out / pressing enter |
|
|
|
// for non-firefox browsers only |
|
|
|
// for non-firefox browsers only |
|
|
|
submitCurrency() |
|
|
|
submitCurrency() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const onKeydownEnter = () => { |
|
|
|
const onKeydownEnter = () => { |
|
|
|
// for firefox, onBlur is never executed |
|
|
|
// onBlur is never executed for firefox & safari |
|
|
|
// we use keydown.enter to trigger submitCurrency |
|
|
|
// we use keydown.enter to trigger submitCurrency |
|
|
|
if (/Firefox/.test(navigator.userAgent)) { |
|
|
|
if (/(Firefox|Safari)/.test(navigator.userAgent)) { |
|
|
|
submitCurrency() |
|
|
|
submitCurrency() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|