Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

prevent numeric value navigation with data attr #43

Merged
merged 1 commit into from
Jun 7, 2016

Conversation

johnbender
Copy link
Contributor

This PR adds the ability to prevent numeric value navigation using the keyboard.

this.$el.on( "focus", function( e ) {
self.initMaxlength();
}).on( "keypress", function( e ) {
}).on( "keydown", function( e ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me nervous and needs at least one other set of eyes.

@toddparker
Copy link
Member

@johnbender - I'll let @zachleat review the JS but I wonder if we could also key this off of the presence of this class which hides the spinner arrows:
class="formcore-disable-spinner"

...we can also have the data attr there, but if we added support via class this won't require a markup change

@zachleat
Copy link
Member

zachleat commented Jun 7, 2016

LGTM @johnbender!

@zachleat zachleat merged commit 220e7a5 into master Jun 7, 2016
@zachleat zachleat deleted the up-down-arrow-numeric branch June 7, 2016 13:31
@toddparker
Copy link
Member

@johnbender - see my comment above, might wan to add this class trigger as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants