-
Notifications
You must be signed in to change notification settings - Fork 75
Spinner: Document that manually entered values are never modified - Fixe... #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -20,6 +20,8 @@ | |||
|
|||
<p>Focus stays in the text field, even after using the mouse to click one of the spin buttons.</p> | |||
|
|||
<p>When the spinner is not read only, the user may enter a value via the text field that causes an invalid value (below min, above max, step mismatch, non-numeric input). Whenever a step is taken, either programmatically or via the step buttons, the value will be forced to a valid value (see the description for <a href="#method-stepUp"><code>stepUp()</code></a> and <a href="#method-stepDown"><code>stepDown()</code></a> for more details).</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"When the spinner is not read only"
"read only" as in thereadonly
HTML attribute?"the user may enter a value via the text field that causes an invalid value"
This reads a little strange because "value" is included twice. Maybe something like "the user may enter an invalid value into the text field (below min, etc..." Just a suggestion.
We should probably include an example of how to force a valid value on blur, with a note about potential usability issues when doing so. |
Updated the wording, including a code example for the readonly attribute. I'm not sure right now how to force a valid value on blur. |
The We should probably add some more detail to the Note: I thought that |
So like http://jsfiddle.net/tj_vantoll/2bxRU, right? I'm a bit torn. It would be nice to have a means of getting a valid value, but I would personally not expect |
@tjvantoll I think you forgot to save your changes. The fiddle is just a standard spinner. |
Ok, let's keep the current behavior. |
I still don't know what to add to address "how to force a valid value on blur". |
var value = elem.spinner( "value" );
if ( value === null ) {
elem.val( "" );
} else {
elem.spinner( "value", value );
} After discussing this in IRC, I think we actually shouldn't show how to do this, but instead just add an |
...s #161