If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Make use of type="number" for textboxes representing integer preferences

RESOLVED FIXED in 1.0b1

Status

Calendar
Preferences
--
enhancement
RESOLVED FIXED
9 years ago
6 years ago

People

(Reporter: Stefan Sitter, Assigned: Fallen)

Tracking

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

9 years ago
We should use type="number" for textboxes representing integer preferences to benefit from automatic input check, range checks, spinbuttons, ...
https://developer.mozilla.org/En/XUL/Textbox#a-textbox.type
(Reporter)

Comment 1

9 years ago
Created attachment 349561 [details] [diff] [review]
fix

- uses type="number" on general, alarms and connection page
- limits event length and snooze time to 24 hours instead of just 999 minutes
- limits alarm offset to 32767 to avoid overflow similar to Bug 405650
Assignee: nobody → ssitter
Status: NEW → ASSIGNED
Attachment #349561 - Flags: review?(daniel.boelzle)
Stefan, I think, the function validateNaturalNums (http://mxr.mozilla.org/comm-central/source/calendar/base/content/calendar-ui-utils.js#594) should also be removed.
Comment on attachment 349561 [details] [diff] [review]
fix

Playing with the patch on Mac, my alarm prefs behave wrong, units toggle in a strange way.
Moreover I think validateNaturalNums() is obsolete then, you should remove it.
Attachment #349561 - Flags: review?(daniel.boelzle) → review-
(Reporter)

Updated

9 years ago
Assignee: ssitter → nobody
Status: ASSIGNED → NEW
(Assignee)

Comment 4

8 years ago
Created attachment 383153 [details] [diff] [review]
Fix - v2

This should do it. I went over all <textboxes>. I didn't set a max on the default event length, I don't see why the max should be 1440 (days). No doubt its unreasonable to make the default length that large, but why limit the user?
Assignee: nobody → philipp
Attachment #349561 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #383153 - Flags: review?(ssitter)
(Reporter)

Comment 5

8 years ago
Comment on attachment 383153 [details] [diff] [review]
Fix - v2

The max attribute was set to prevent integer overflows as written above.

Daniel reviewed and denied the 1st patch, therefore he should review the 2nd too.
Attachment #383153 - Flags: review?(ssitter) → review?(dbo.moz)
Philipp, did you spend some testing on this patch?
(Assignee)

Comment 7

8 years ago
Yes, I've briefly looked at all number textboxes. I tested at least one of them to see if the max/min range works.

Updated

8 years ago
Attachment #383153 - Flags: review?(dbo.moz) → review+
Comment on attachment 383153 [details] [diff] [review]
Fix - v2

r=dbo
(Assignee)

Comment 9

8 years ago
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/08625567a7c7>

-> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
(Assignee)

Comment 10

6 years ago
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.