[DateTimeInput] input field cleared unexpectedly when using up/down keys

RESOLVED FIXED in Firefox 52

Status

()

Core
Layout: Form Controls
RESOLVED FIXED
7 months ago
7 months ago

People

(Reporter: jessica, Assigned: jessica)

Tracking

(Blocks: 1 bug)

52 Branch
mozilla52
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox52 fixed)

Details

(Whiteboard: [datetime])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

7 months ago
When millisecond field is empty, using up/down keys in other fields will clear all the fields unexpectedly.
(Assignee)

Comment 1

7 months ago
Created attachment 8806641 [details] [diff] [review]
patch, v1.
Blocks: 888320
Whiteboard: [datetime]
(Assignee)

Comment 2

7 months ago
Created attachment 8807446 [details] [diff] [review]
patch, v1.

Check for millisecond as well when setting input element's value, otherwise it will try to set input element's value to "hh:mm:ss." which is not a valid time string, hence value becomes empty string.
Attachment #8806641 - Attachment is obsolete: true
Attachment #8807446 - Flags: review?(mconley)
Comment on attachment 8807446 [details] [diff] [review]
patch, v1.

Review of attachment 8807446 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!

::: toolkit/content/widgets/datetimebox.xml
@@ +328,5 @@
>              } else if (aTargetField == this.mMinuteField) {
>                value = now.getMinutes();
>              } else if (aTargetField == this.mSecondField) {
>                value = now.getSeconds();
> +            } else if (aTargetField == this.mMillisecField) {

Gah! Good catch!
Attachment #8807446 - Flags: review?(mconley) → review+
(Assignee)

Comment 4

7 months ago
Thanks Mike!

https://treeherder.mozilla.org/#/jobs?repo=try&revision=1bde90d0f871&group_state=expanded&selectedJob=30535188
failures seems not related to this bug.
Keywords: checkin-needed

Comment 5

7 months ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/eab190f5dc94
Verify millisecond field when setting input time elemet's value. r=mconley
Keywords: checkin-needed

Comment 6

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/eab190f5dc94
Status: NEW → RESOLVED
Last Resolved: 7 months ago
status-firefox52: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.