Page range validates the . (dot) before and after the numeric value
Categories
(Toolkit :: Printing, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox-esr78 | --- | unaffected |
firefox80 | --- | unaffected |
firefox81 | --- | fixed |
firefox82 | --- | verified |
People
(Reporter: emilghitta, Assigned: mtigley)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression, Whiteboard: [print2020_v81] [old-ui-] [Fixed by 1660060])
Attachments
(2 files, 1 obsolete file)
Affected versions
- 82.0a1 (BuildId:20200824215021)
- 81.0b1 (BuildId:20200824150741)
Affected platforms
- Windows 10 64bit
- macOS 10.14
- Ubuntu 20.04 64bit
Steps to reproduce
- Launch Firefox.
- Open any webpage.
- Hit CTRL + P.
- Choose the “Custom” option from the “Pages” dropdown menu.
Input a numeric value that starts with a dot (ex: .3 for a webpage that prints at least 3 pages).
Expected result
- The following error message is displayed: “Range must be a number between 1 and 5.”
Actual result
- The dot is validated and the following error is displayed: “The “from” page number must be smaller than the “to” page number”.
Regression Window
- The "before the numeric value" scenario (which displays an incorrect error message) seems to be a regression:
- Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=80e6be24260d34c7638715107e676806817d0a43&tochange=89bbbe5e6369e1ce2b75ddf75cd201782ce362b2
- Potential regressor: Bug 1653389
Additional Information
- For further information regarding this issue please observe the attached screenshots.
- The same outcome seems to happen if you put - in front of the numeric value.
- On a different note, it seems that the dot is being validated after the numeric value as well.
Reporter | ||
Comment 1•4 years ago
•
|
||
Hi Emma!
It seems that mozregression pointed out Bug 1653389, show clearer error message if the start range is greater than the end range r=fluent-reviewers,mstriemer,flod
for causing the regression where the incorrect error message is displayed if the dot is placed before the numeric value inside the to section.
Can you please take a look?
Thank you!
Also, it seems that 81.0b1 (Build:20200824150741) seems to be affected as well...so I'm wondering if Bug 1653389 has already entered beta somehow. (graph view)
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 2•4 years ago
|
||
Attaching the error message that was displayed before Bug 1653389
Reporter | ||
Updated•4 years ago
|
Comment 3•4 years ago
|
||
I mean, 1 is bigger than 0.1, so the error message is technically correct… 😉
But yeah, we probably want to change that.
Reporter | ||
Comment 4•4 years ago
|
||
ofc :D ...But we might want to invalidate decimal values.
Comment 5•4 years ago
|
||
Todo: "1.2" should be given the correct error message
Updated•4 years ago
|
Comment 6•4 years ago
|
||
I think this should be fixed by disallowing non-numeric characters in our number fields, which is bug 1660060.
Comment 7•4 years ago
|
||
Yeah, I originally thought we could introduce a pattern to allow 0-9 chars (and maybe whitespaces) like we do for some number validations https://searchfox.org/mozilla-central/source/browser/extensions/formautofill/test/fixtures/third_party/QVC/PaymentMethod.html#92 , but it looks like that's only possible in text
fields. And if we change it to that, then we miss out on all the number validation we already have implemented.
Micah had mentioned looking at the key presses for bug 1660060. I guess nothing needs to be done for this, and we can close out once that bug is resolved
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 8•4 years ago
|
||
(In reply to Mark Striemer [:mstriemer] from comment #6)
I think this should be fixed by disallowing non-numeric characters in our number fields, which is bug 1660060.
This is fixed, and indeed I get the expected result now. Emil, can you verify this is fixed?
Reporter | ||
Comment 9•4 years ago
•
|
||
I can confirm that this issue is verified fixed using Firefox 82.0a1 (BuildId:20200902215721) on Windows 10 64bit, macOS 10.14 and Ubuntu 18.04 64bit.
Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Description
•