feat/InputNumber: Accept Comma And NumpadDecimal as decimal "sign", only for locale 'fr-FR' ?
As anAZERTY (French) keyboard layout with french localization : having to use the comma is really counter intuitive. Here is a schema for better understanding. 354626602-0ea25181-44d4-44a3-9040-05c44de22ce2 To improve the user experience, it would be desirable to use a Comma (, or ,) to go to the decimal part.pull/6506/head
parent
508652963a
commit
cafeeeebbb
|
@ -540,6 +540,11 @@ export default {
|
|||
let isDecimalSign = this.isDecimalSign(char);
|
||||
const isMinusSign = this.isMinusSign(char);
|
||||
|
||||
if (this.locale === 'fr-FR' && (event.code === 'Comma' || event.code === 'NumpadDecimal') && !isDecimalSign) {
|
||||
isDecimalSign = true
|
||||
char = decimalSign
|
||||
}
|
||||
|
||||
if (event.code !== 'Enter') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue