Closed Bug 1209766 Opened 11 years ago Closed 10 years ago

When <input type="number"> changes from one invalid state to a different invalid state, the validation message should update

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox44 --- affected
firefox48 --- fixed

People

(Reporter: arni2033, Assigned: stone)

References

Details

(Whiteboard: [tw-dom] btpp-active)

Attachments

(2 files)

STR: (Win7_64, Nightly 44, 32bit, ID 20150926030216, new profile, safe mode) 1. Open attached testcase (just an input with styling) 2. Type "4.56." (four-dot-five-six-dot) in input, press Enter [You'll get "4.56." in the input. Notification "Please enter a number" will appear] [OK] 3. Delete last symbol, press Enter [You'll get "4.56" in the input. Notification "Please enter a number" will appear] [BAD] 4. Click outside the input. Click the input again to focus it 5. Press Enter [The value of input is still "4.56". Notification "Please select a valid value. The two nearest valid values are 4.55 and 4.65" will appear] [OK] 6. Delete last symbol, press Enter [You'll get "4.5" in the input. Notification "Please select a valid value. The two nearest valid values are 4.55 and 4.65" will appear] [BAD] 7. Click outside the input. Click the input again to focus it 8. Press Enter [The value of input is still "4.5". Notification "Please select a value that is no less than 4.55" will appear] [OK] Expectations: 3. [Notification "Please select a valid value. The two nearest valid values are 4.55 and 4.65" should appear] 6. [Notification "Please select a value that is no less than 4.55" should appear]
Summary: <input type="number">s provide wrong notification second user submits the form time if he modifies wrong string → When <input type="number"> changes from one invalid state to a different invalid state, the validation message should update
I would like to try on this bug.
Assignee: nobody → sshih
The validation message is only updated after the focused element changed. Always updating the validation message before popping notification can fix it.
Attachment #8729323 - Flags: review?(khuey)
Comment on attachment 8729323 [details] [diff] [review] Always updates the validation message before showing notification Review of attachment 8729323 [details] [diff] [review]: ----------------------------------------------------------------- Nice catch!
Attachment #8729323 - Flags: review?(khuey) → review+
Whiteboard: [tw-dom] → [tw-dom] btpp-active
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Regressions: 1973149
No longer regressions: 1973149
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: