1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00
metamask-extension/app/_locales
Elliot Winkler bd12ea733a
Fix autolock field to accept decimals in Firefox (#19653)
The autolock field on the Settings screen — the field that allows users
to set the duration that MetaMask will wait for until automatically
locking — does not always accept decimal numbers. This breaks the e2e
test for this feature as it attempts to set this field to "0.1".

More specifically, the React component responsible for this field passes
whatever the user inputs through the `Number` function immediately and
then uses this to repopulate the input. Therefore, if the user enters
"3" followed by a ".", `Number("3.")` will be called. This evaluates to
the number 3, and "3" becomes the new value of the field. As a result,
the "." can never be typed.

Curiously, this behavior only happens in Firefox; Chrome seems to
keep the "." in the input field when it's typed. This happens because
`onChange` event doesn't seem to get fired until a number is typed
*after* the ".". This may be due to underlying differences in the DOM
between Chrome and Firefox.

Regardless, always passing the input through `Number` creates other odd
behavior, such as the fact that the input can never be cleared (because
`Number("")` evaluates to 0).

This commit solves these problems by saving the "raw" version of the
user's input as well as the normalized version. The raw version is
always used to populate the input, whereas the normalized version is
saved in state.
2023-06-22 10:29:24 -06:00
..
am Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
ar Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
bg Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
bn Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
ca Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
cs Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
da Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
de Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
el Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
en Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
es Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
es_419 Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
et Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
fa Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
fi Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
fil Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
fr Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
gu Buy crypto by redirecting to onramp experience on pdapp instead of deposit popover (#17689) 2023-03-01 12:45:27 +04:00
he Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
hi Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
hn Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
hr Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
ht Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
hu Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
id Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
it Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
ja Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
kn Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
ko Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
lt Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
lv Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
ml Buy crypto by redirecting to onramp experience on pdapp instead of deposit popover (#17689) 2023-03-01 12:45:27 +04:00
mr Buy crypto by redirecting to onramp experience on pdapp instead of deposit popover (#17689) 2023-03-01 12:45:27 +04:00
ms Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
nl Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
no Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
ph Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
pl Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
pt Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
pt_BR Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
pt_PT Buy crypto by redirecting to onramp experience on pdapp instead of deposit popover (#17689) 2023-03-01 12:45:27 +04:00
ro Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
ru Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
sk Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
sl Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
sr Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
sv Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
sw Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
ta Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
te Buy crypto by redirecting to onramp experience on pdapp instead of deposit popover (#17689) 2023-03-01 12:45:27 +04:00
th Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
tl Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
tr Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
uk Updated contacts Title and copy changes in Send Flow (#19618) 2023-06-16 21:36:27 +05:30
vi Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
zh_CN Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
zh_TW Fix autolock field to accept decimals in Firefox (#19653) 2023-06-22 10:29:24 -06:00
index.json Add tl localized messages (#10269) 2021-02-24 23:54:01 -03:30