Open Bug 1576378 Opened 5 years ago Updated 2 years ago

GeckoView apps not showing "Please enter a number" popup message for invalid separater error on Polish locale

Categories

(GeckoView :: General, defect, P3)

68 Branch
ARM
Android

Tracking

(firefox70 affected, firefox71 affected, firefox72 affected)

Tracking Status
firefox70 --- affected
firefox71 --- affected
firefox72 --- affected

People

(Reporter: aaatoja, Unassigned)

References

()

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Mobile Safari/537.36 OPR/53.0.2569.141117

Steps to reproduce:

I can't send form with input type number. When sending form on

  • mobile Firefox input has red border with please enter a number message
  • Firefox preview has only red border with no message at all
    Other chromium based browsers (chrome, opera, edge) work fine.

Form has no js, only pure html.

<form method="POST" action="https://..." accept-charset="UTF-8">
    <input class="form-control" autocomplete="off" min="0.00" step="0.01" name="value_start" type="number" id="value_start">
    <input class="btn btn-primary" name="search" type="submit" value="Search">
</form>

Desktop Firefox is not affected with this bug. Android v9, default Samsung keyboard, locale Polish.

Hi, please provide the information for the below questions.
Please specify on which site you encounter this problem?
On what build have you reproduced the issue?
I did not reproduce the issue with Google Pixel 3a (Android 9) and neither with a Samsung Galaxy 10+(Samsung, Model: SM-G975F) (Android 9) on Firefox Release 68.0.2 with Facebook application. Thanks

Flags: needinfo?(aaatoja)
<!DOCTYPE html>
<html lang="pl">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Input number test</title>

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
    <div id="app">
        <form method="POST" action="" accept-charset="UTF-8">
            <input class="form-control" autocomplete="off" min="0.00" step="0.01" name="value_start" type="number" id="value_start">
            <input class="btn btn-primary" name="search" type="submit" value="Search">
        </form>

    </div>
</body>
</html>

You can test it under http://199.241.143.200/number.html

Flags: needinfo?(aaatoja)

I've changed system language to English and I can pass validation now. So problem here is only with Polish lang. As You can see on second screenshot from Opera, keyboard layout is different for separator. On Firefox there is a dot (displayed as dot in form), and Opera has comma (displayed as dot). If i change Samsung keyboard to Swiftkey with both dot and comma chars, I have error with dot, but form passes validation with comma.

Hi, thank you for the details, yes now I reproduce the issue with Samsung Galaxy S10+ (Android 9) on Firefox Release 68.0.2, Firefox Beta 68.1b7, Firefox Nightly 68.1a1 (2019-08-23).
The issue does not reproduce on Firefox Beta 69.0b17 and Firefox Nightly 70.0a1 (2019-08-25).
I will mark this ticket as NEW.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Android
Hardware: Unspecified → ARM
Component: Logins, Passwords and Form Fill → General
Product: Firefox for Android → GeckoView
Version: Firefox 68 → 68 Branch

THis was also reported to affect Fenix so I am asking for GV triage.

(In reply to Diana Rus from comment #5)

Hi, thank you for the details, yes now I reproduce the issue with Samsung Galaxy S10+ (Android 9) on Firefox Release 68.0.2, Firefox Beta 68.1b7, Firefox Nightly 68.1a1 (2019-08-23).
The issue does not reproduce on Firefox Beta 69.0b17 and Firefox Nightly 70.0a1 (2019-08-25).

Does this work on Fenix now (with GeckoView 70 Beta) on a device configured to use the Polish locale?

Kevin said he will investigate.

Flags: needinfo?(kbrosnan)
Summary: Input type number - invalid value provided → Input type number - invalid separater error on Polish locale

Hi, I checked the issue with Fenix/Firefox Preview 2.0.0-rc3 from here which seems to have GV 70(Information taken from 3 dots menu from top right corner/Settings/About Firefox Preview/GV: 70.0-20190909055931).
Devices:

  • Google Pixel 3a XL (Android 9)
  • Samsung Galaxy S9 (Android 8.0.0)
  • Sony Xperia Z5 (Android 7.0)

After testing with the mentioned devices and Fenix version, I can only see that Firefox Preview/Fenix has a red border with no message displayed when having searched a number with decimal using the "." from the onscreen/soft/qwerty keyboard as decimal separator.

Note:

  1. All of the devices have been configured with polish language.
  2. The default keyboards have been used for devices.
  3. Please view the attached screen.

Hope this helps.

Flags: needinfo?(cpeterson)

Diana's testing here is the same as what I am seeing.

Flags: needinfo?(kbrosnan)

I can reproduce this bug on my Moto G5 without switching from en-US to Polish language. I just need to enter a single decimal point "." and tap the blue "Search" button.

This definitely looks like a GeckoView bug.

Browser Red Border? Error Message?
Desktop Firefox 71 Yes Yes
Fennec 68.1 Yes Yes
Fenix 2.0 (GV 70 Beta) Yes No
Fenix 2.2 Nightly (GV 71 Nightly) Yes No
Reference Browser 1.0.1942 (GV 71) Yes No
Focus 8.0.22 (GV 71) Yes No
Android Chrome 77-79 No No Correction: Yes
Android Edge 42.0.2.3931 No Yes?! even though Edge uses Blink?
Attached file number-test-case.html

Attaching Marek's test case for posterity.

Sending to the DOM component for triage.

I can reproduce this bug on my Moto G5 without switching from en-US to Polish language. I just need to enter a single decimal point "." and tap the blue "Search" button.

Correction: my phone's locale was en-US, but the test page's HTML sets the page locale to Polish with <html lang="pl">.

Component: General → DOM: Core & HTML
Product: GeckoView → Core

Chris, I don't really understand the steps to reproduce. If I enter a lone "." or "," Firefox Nightly and Chrome Canary behave identically ("Please enter a number.") If I type "1.1" or "1,1" I can submit those in both browsers.

Flags: needinfo?(cpeterson)

(In reply to Anne (:annevk) from comment #13)

Chris, I don't really understand the steps to reproduce. If I enter a lone "." or "," Firefox Nightly and Chrome Canary behave identically ("Please enter a number.") If I type "1.1" or "1,1" I can submit those in both browsers.

I was just about to reply here. I was confused like Anne.

I got expected result on Firefox Preview 2.2.0 (Build #12901947)

(In reply to Anne (:annevk) from comment #13)

Chris, I don't really understand the steps to reproduce. If I enter a lone "." or "," Firefox Nightly and Chrome Canary behave identically ("Please enter a number.") If I type "1.1" or "1,1" I can submit those in both browsers.

Steps to reproduce

  1. In Firefox Preview, load test page: https://bug1576378.bmoattachments.org/attachment.cgi?id=9101192
  2. Enter a single comma , or decimal point .
  3. Tap the "Search" button

Expected Behavior

A "Please enter a number" popup message should be shown and the text field border should turn red.

Actual behavior

The text field border turns red, but no "Please enter a number" popup message is shown.


I can still reproduce this bug. I'm using a Moto G5 Plus running Android 8.1.

In Firefox Preview 2.2.0, Reference Browser 1.0.1943, and Focus 8.0.23 (GeckoView 71 Nightly), entering a single comma ' or decimal point . and tapping "Search" turns the text field border red but doesn't show an "Enter a number" popup message.

In both Chrome (77 on Android 8.1 and 78 on Windows) and Chrome Dev (79 on Android 8.1 and Windows):

  • Chrome does not permit me to enter a comma , alone or after some digits.
  • If enter a decimal point . alone and then tap the "Search" button, Chrome shows a "Please enter a number" popup message.

So I see two bugs here:

  1. Gecko (on Android and desktop) should not permit the user to enter a comma ,. (Chrome does not permit entering a comma , but Edge on Windows does.)
  2. GeckoView apps (Firefox Preview, R-B, and Focus) should show a "Please enter a number" popup message.
Flags: needinfo?(cpeterson)

(In reply to Chris Peterson [:cpeterson] from comment #15)

(In reply to Anne (:annevk) from comment #13)

Chris, I don't really understand the steps to reproduce. If I enter a lone "." or "," Firefox Nightly and Chrome Canary behave identically ("Please enter a number.") If I type "1.1" or "1,1" I can submit those in both browsers.

Steps to reproduce

  1. In Firefox Preview, load test page: https://bug1576378.bmoattachments.org/attachment.cgi?id=9101192
  2. Enter a single comma , or decimal point .
  3. Tap the "Search" button

Expected Behavior

A "Please enter a number" popup message should be shown and the text field border should turn red.

Actual behavior

The text field border turns red, but no "Please enter a number" popup message is shown.


I can still reproduce this bug. I'm using a Moto G5 Plus running Android 8.1.

In Firefox Preview 2.2.0, Reference Browser 1.0.1943, and Focus 8.0.23 (GeckoView 71 Nightly), entering a single comma ' or decimal point . and tapping "Search" turns the text field border red but doesn't show an "Enter a number" popup message.

In both Chrome (77 on Android 8.1 and 78 on Windows) and Chrome Dev (79 on Android 8.1 and Windows):

  • Chrome does not permit me to enter a comma , alone or after some digits.
  • If enter a decimal point . alone and then tap the "Search" button, Chrome shows a "Please enter a number" popup message.

So I see two bugs here:

  1. Gecko (on Android and desktop) should not permit the user to enter a comma ,. (Chrome does not permit entering a comma , but Edge on Windows does.)

John, do you know if spec defines an exact behavior for this case? Is this something we change for the validation?

  1. GeckoView apps (Firefox Preview, R-B, and Focus) should show a "Please enter a number" popup message.
Flags: needinfo?(jdai)

(In reply to Hsin-Yi Tsai [:hsinyi] from comment #16)

(In reply to Chris Peterson [:cpeterson] from comment #15)

(In reply to Anne (:annevk) from comment #13)

Chris, I don't really understand the steps to reproduce. If I enter a lone "." or "," Firefox Nightly and Chrome Canary behave identically ("Please enter a number.") If I type "1.1" or "1,1" I can submit those in both browsers.

Steps to reproduce

  1. In Firefox Preview, load test page: https://bug1576378.bmoattachments.org/attachment.cgi?id=9101192
  2. Enter a single comma , or decimal point .
  3. Tap the "Search" button

Expected Behavior

A "Please enter a number" popup message should be shown and the text field border should turn red.

Actual behavior

The text field border turns red, but no "Please enter a number" popup message is shown.


I can still reproduce this bug. I'm using a Moto G5 Plus running Android 8.1.

In Firefox Preview 2.2.0, Reference Browser 1.0.1943, and Focus 8.0.23 (GeckoView 71 Nightly), entering a single comma ' or decimal point . and tapping "Search" turns the text field border red but doesn't show an "Enter a number" popup message.

In both Chrome (77 on Android 8.1 and 78 on Windows) and Chrome Dev (79 on Android 8.1 and Windows):

  • Chrome does not permit me to enter a comma , alone or after some digits.
  • If enter a decimal point . alone and then tap the "Search" button, Chrome shows a "Please enter a number" popup message.

So I see two bugs here:

  1. Gecko (on Android and desktop) should not permit the user to enter a comma ,. (Chrome does not permit entering a comma , but Edge on Windows does.)

John, do you know if spec defines an exact behavior for this case? Is this something we change for the validation?

AFIK, spec doesn't define the behavior to disallow user to enter a comma ,. Also, I'm not aware of any recent changes to the validation in DOM part.

  1. GeckoView apps (Firefox Preview, R-B, and Focus) should show a "Please enter a number" popup message.
Flags: needinfo?(jdai)

So, according to comment 17, the gecko platform work as expected per spec.
But we will need to fix on GeckoView apps (Firefox Preview, R-B, and Focus) side, to properly show a "Please enter a number" popup message.

Flags: needinfo?(cpeterson)

(In reply to Hsin-Yi Tsai [:hsinyi] from comment #18)

So, according to comment 17, the gecko platform work as expected per spec.
But we will need to fix on GeckoView apps (Firefox Preview, R-B, and Focus) side, to properly show a "Please enter a number" popup message.

Thanks for confirming. In that case, I will move this bug from DOM back to GeckoView.

The GeckoView team might need to do some API work to enable the GeckoView app teams (Firefox Preview, R-B, and Focus) to show the popup message.

Component: DOM: Core & HTML → General
Flags: needinfo?(cpeterson)
Product: Core → GeckoView
Summary: Input type number - invalid separater error on Polish locale → GeckoView apps not showing "Please enter a number" popup message for invalid separater error on Polish locale

P3 until a high visibility website is affected.

Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: