Opened 8 years ago

Closed 8 years ago

#13196 closed defect (invalid)

NumberTextBox using pattern w/ valid data becomes invalid on refocus.

Reported by: Ragnorok Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.5
Keywords: NumberTextBox munge Cc: Douglas Hays
Blocked By: Blocking:

Description

  • NumberTextBox? has a pattern: ##.00
  • Enter a valid number with a trailing zero: 11.20
  • Validator accepts number, allest ist gut.
  • Tab or click out of the field, then tab or click back into it.
  • Number automagically becomes "11.2" and validation fails, forcing one to append a zero to make it right again.


  • This appears to be a systemic issue with NumberTextBox? in general, where valid input is munged when focus is re-acquired. It appears the widget is reformatting the value on focus, and doing it badly. Searching bugs I see only one related to this, regarding percentages being mangled in a similar manner, and that one is still outstanding as I post this defect.

Change History (3)

comment:1 Changed 8 years ago by Adam Peller

Cc: Douglas Hays added
Component: GeneralDijit

Rags - please reference other tickets using #nnnn with the bug number and trac will provide a link.

There is an editPattern property which is specific to the representation when the value has focus. Perhaps you need to override that as well?

comment:2 Changed 8 years ago by Douglas Hays

editOptions='{pattern:"##.00"}'

comment:3 Changed 8 years ago by Douglas Hays

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.