Print dialog's validated fields (range, scale) should either tolerate or prevent whitespace
Categories
(Toolkit :: Printing, defect, P2)
Tracking
()
People
(Reporter: dholbert, Assigned: mtigley)
References
Details
(Whiteboard: [print2020_v81])
Attachments
(4 files, 1 obsolete file)
(deleted),
image/png
|
Details | |
(deleted),
image/png
|
Details | |
(deleted),
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details |
(deleted),
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details |
STR:
- Open the new print UI
- Click "more settings" and then "scale", and put your cursor in the "Scale" textfield.
- Type in
100
with a leading or trailing space. (Pretend you put in the space by accident.) - Try to interpret the resulting UI.
ACTUAL RESULTS:
We highlight the field as invalid, with a message saying "Scale must be a value between 10 and 200". And it looks visually like the field contains the value 100, which should be valid.
EXPECTED RESULTS:
Either:
- we should trim whitespace in our parsing/validation
... or: - we should constrain the field to only allow the user to enter numeric input, somehow. (It is a little weird that I can type in a space character at all in this field, or a value like "aaa" for that matter...)
Similarly we reject values like "50%" (including a literal percent character) which feels like a footgun - we should either trim out or forbid the percent character just like we should do for any whitespace that is present.
Reporter | ||
Comment 1•4 years ago
|
||
(The STR produce similar "actual results" for the validated from/to "range" fields that are being added in bug 1653389, too.)
Reporter | ||
Comment 2•4 years ago
|
||
Reporter | ||
Comment 3•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 5•4 years ago
|
||
Ideally, these number fields would disallow any character that isn't 0-9.
Assignee | ||
Comment 6•4 years ago
|
||
Pushed by mtigley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/21165ed01da8 Add a keypress listener to the percentScale element. r=emalysz
Comment 8•4 years ago
|
||
bugherder |
Assignee | ||
Comment 10•4 years ago
|
||
Comment on attachment 9172441 [details]
Bug 1660060 - Add a keypress listener to the percentScale element. r?emalysz
Beta/Release Uplift Approval Request
- User impact if declined: Users can enter whitespace which invalidates their input. This experience is inconvenient if the whitespace was accidentally entered and can result in a confusing experience for the user trying to change the page scale.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment 0
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Not risky since this patch adds a small restriction for certain input (ie: non-numeric characters) from being entered and only impacts the scale input UI component.
- String changes made/needed:
Assignee | ||
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Comment on attachment 9172441 [details]
Bug 1660060 - Add a keypress listener to the percentScale element. r?emalysz
Approved for 81.0b4.
Comment 12•4 years ago
|
||
bugherder uplift |
Updated•4 years ago
|
Updated•4 years ago
|
Comment 13•4 years ago
|
||
This issue is verified fixed using Firefox 81.0b4 (BuildId:20200829200810) and Firefox 82.0a1 (BuildId:20200831091558) on Windows 10 64bit, macOS 10.14 & Ubuntu 20.04.
Comment 14•4 years ago
|
||
Reopening because a second patch is required to handle the start/end page range fields. Sorry, forgot to mark as "leave-open"
Assignee | ||
Comment 15•4 years ago
|
||
Assignee | ||
Comment 16•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 17•4 years ago
|
||
Pushed by mtigley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4e9e20d085c1 Add a keypress handler to PrintUIControlMixin that prevents invalid input. r=emalysz
Assignee | ||
Comment 18•4 years ago
|
||
Comment on attachment 9173384 [details]
Bug 1660060 - Add a keypress handler to PrintUIControlMixin that prevents invalid input. r?emalysz
Beta/Release Uplift Approval Request
- User impact if declined: Users can enter whitespaces into the copies and page range fields, which invalidates their input. This experience is inconvenient if the whitespace was accidentally entered and can result in a confusing experience for the user trying to change inputs for these fields.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment0 except test this on the "Copies" and "Pages (Custom)" fields.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Not risky since this patch adds a small restriction for certain input (ie: non-numeric characters) from being entered and only impacts the scale input, copies, and page range UI components.
- String changes made/needed:
Assignee | ||
Updated•4 years ago
|
Comment 19•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Comment 20•4 years ago
|
||
Comment on attachment 9173384 [details]
Bug 1660060 - Add a keypress handler to PrintUIControlMixin that prevents invalid input. r?emalysz
Approved for 81.0b6.
Comment 21•4 years ago
|
||
bugherder uplift |
Comment 22•4 years ago
|
||
This is verified fixed using Firefox 81.0b8 (BuildId:20200908191057) on Windows 10 64bit, macOS 10.14 & Ubuntu 18.04 64bit.
Description
•