Closed Bug 1623131 Opened 5 years ago Closed 5 years ago

localisation lang="de" should make input type="number" display comma and decimals entered with comma are not accepted as numbers

Categories

(Core :: Layout: Form Controls, enhancement)

74 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1622221

People

(Reporter: utopia, Unassigned)

Details

Attachments

(1 file)

Attached file html5.input.number.locale.html (deleted) —

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0

Steps to reproduce:

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
</head>
<body lang="de">
<pre>

<label for="typenumber">local_default</label>
<input id="typenumber1" type="number" step="any" value="3.14" oninput="myfunc();" />

<label for="typenumber">local_de</label>
<input id="typenumber2" name="typenumber" type="number" step="any" value="3.14" oninput="myfunc();" />

<div id="log"></div>

</pre>
</body>
<script type="text/javascript">

function myfunc()
{

var numid;
var numval;
var text = "";

console.log("onchange called...");

numid = "typenumber1";
numval = document.getElementById(numid).value;
text += numid + " x 2 = " + numval * 2 + "<br>\n";

numid = "typenumber2";
numval = document.getElementById(numid).value;
text += numid + " x 2 = " + numval * 2 + "<br>\n";

document.getElementById('log').innerHTML = text;

}

myfunc();

</script>
</html>

Actual results:

dots displayed as comma instead of comma
if comma value is entered calculation result is NaN

Expected results:

comma should be used
value should be accepted as number

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Component: Untriaged → Layout: Form Controls
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: