Search and Top Navigation
#9515 closed bug (notabug)
Opened August 26, 2013 07:58PM UTC
Closed August 26, 2013 08:07PM UTC
Spinner does not add currency symbol after value entered by keypress
Reported by: | jdawg1983 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.spinner | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When a spinner is set for currency and a user sets value to zero i.e. £1.00 to 0 (note the pound symbol is now missing) the spinner control does not replace the currency symbol after keydown or keypress or blur. However by using keyup or keydown to change the value will reformat the value and bring back the currency symbol.
If this is by design then maybe an option that makes the currency symbol fixed in place would be useful.
Attachments (0)
Change History (1)
Changed August 26, 2013 08:07PM UTC by comment:1
description: | When a spinner is set for currency and a user sets value to zero i.e. £1.00 to 0 (note the pound symbol is now missing) the spinner control does not replace the currency symbol after keydown or keypress or blur. However by using keyup or keydown to change the value will reformat the value and bring back the currency symbol. \ If this is by design then maybe an option that makes the currency symbol fixed in place would be useful. \ \ A simple fix I have applied on line 13513: \ _keydown: function( event ) { // EXISTING CODE \ var options = this.options, // EXISTING CODE \ keyCode = $.ui.keyCode; // EXISTING CODE \ \ var value = this.value() || 0; \ this._value(value); \ \ → When a spinner is set for currency and a user sets value to zero i.e. £1.00 to 0 (note the pound symbol is now missing) the spinner control does not replace the currency symbol after keydown or keypress or blur. However by using keyup or keydown to change the value will reformat the value and bring back the currency symbol. \ If this is by design then maybe an option that makes the currency symbol fixed in place would be useful. \ |
---|---|
resolution: | → notabug |
status: | new → closed |
summary: | spinner does not add currency symbol after value entered by keypress → Spinner does not add currency symbol after value entered by keypress |
The spinner never adjusts a manually entered value. I've filed an issue to get this properly documented: https://github.com/jquery/api.jqueryui.com/issues/161