Closed Bug 1586870 Opened 6 years ago Closed 6 years ago

can not enter 0 in the mobile number field on Vodafone NUC request page

Categories

(Web Compatibility :: Site Reports, defect, P3)

defect

Tracking

(firefox69 affected, firefox70 affected, firefox71 affected)

RESOLVED DUPLICATE of bug 981248
Tracking Status
firefox69 --- affected
firefox70 --- affected
firefox71 --- affected

People

(Reporter: alarma, Unassigned)

References

()

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Went to https://www.vodafone.co.uk/vodafone-uk/forms/unlock-code-request/ to request unlock code. In Mobile number field and Confirm Mobile Number when I enter 0 it gets removed automatically.

Actual results:

0 dissappears as soon as I enter different number.

Expected results:

zero must stay

Hi alarma,

Thanks for submitting this bug to us. I was able to reproduce it using Firefox Nightly 71.0a1 (2019-10-10) (64-bit) and Firefox 69.0.3 (64-bit) on macOS Mojave 10.14.4

I've also tried it on Google Chrome 76.0 and I wasn't able to reproduce it there.

I'm going to add a Product and a Component so one of our Dev guys can take a look.

Thanks!

Sebastian

Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Form Controls
Ever confirmed: true
Product: Firefox → Core

Change the status for beta to have the same as nightly and release.
For more information, please visit auto_nag documentation.

Unlikely to be a layout bug per se, probably a compat issue of some sort with the JS in the site. Mike is this something that the compat team can diagnose and move to the right place? I'm happy to poke otherwise.

Component: Layout: Form Controls → Mobile
Flags: needinfo?(miket)
Product: Core → Web Compatibility
Version: 68 Branch → unspecified

Note: to see the form, I answered "Pay Monthly", Yes, Yes, Yes, No, No in the Get your Network Unlock Code (NUC) section.

Toggling dom.keyboardevent.keypress.set_keycode_and_charcode_to_same_value has no effect. I'll dig in in a bit.

This confused me for a bit... but it's not something that the site is doing, AFAICT. It seems to be a duplicate of Bug 1005603.

<input type="number" name="mobile_0" id="mobnum_0" class="mobileuk required"> -- note that's a type=number input.

There's a keyup handler in https://www.vodafone.co.uk/cs/groups/system/documents/webasset/nuc-form-js.js:

a('.mobileuk').keyup(function (b) {
      var c = a(this).val();
      c = c.replace(/\s/g, ''),
      a(this).val(c)
    }),

Bug 1005603 describes the issue that if you set the value of a number input (which is what happens when it tries to remove whitespace), we will strip out leading 0s -- which this form relies on: https://bugzilla.mozilla.org/show_bug.cgi?id=1005603#c11

URL: https://www.vodafone.co.uk/vodafone-u...
Flags: needinfo?(miket)
Depends on: 1005603

I guess we can leave this open, but we should really try to sort this out to match what sites are expecting.

Priority: -- → P3

Fixed by bug 981248.

URL: https://www.vodafone.co.uk/vodafone-u...https://www.vodafone.co.uk/vodafone-u...
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Component: Mobile → Site Reports
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: