Skip to content
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

autotab number breaks oninput handler #103

Open
CharlieReitzel opened this issue Feb 14, 2017 · 0 comments
Open

autotab number breaks oninput handler #103

CharlieReitzel opened this issue Feb 14, 2017 · 0 comments

Comments

@CharlieReitzel
Copy link

CharlieReitzel commented Feb 14, 2017

For input elements like so, <input type="text" class="number" oninput="myhandler();" ...>, the oninput handler is called for every input but the last one (when auto-tabbing to next field).

That's the one that I really need, btw. Since the handler will enable the submit button when the input is valid. onchange still works. But this has problems when the button to be enabled is next in the tab order. The onchange event fires too late and whatever is after the button gets focus. So we really need oninput.

We have a group of 3 such fields in the form. Our work-around is to change the type of the last field to 'tel' from 'text'. But this effectively turns off the important features of autotab() (for us, anyway).

This is very similar to your phone number example here:
http://www.mathachew.com/sandbox/jquery-autotab/#number1

The example would be that we want to also have an oninput handler for those fields.

Any guidance on how to use autotab() and still keep our oninput handler?

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

No branches or pull requests

1 participant