marklagendijk / jquery.tabbable

Simple utility for selecting the next / previous ':tabbable' element.
MIT License
46 stars 27 forks source link

Added features focusNextAt and focusPrevOnEmpty #1

Closed gabriel-felipe closed 10 years ago

gabriel-felipe commented 10 years ago

Sometimes it's really good to UX if fields jumps to the next one when done completed. This occurs when we know the exactly amount of characters that field should be. For example, we could have 3 date fields for Year, Month and Day, respectively. So we make year jumps to month as soon as I type de 4 digit on year and month jump to day as soon as I type the second digit on month. And given that, it's really nice that we can erase continuously from one field to the previous to, so if I typed the wrong date, I can erase the days, and cursor will jump to the end of month, if I erase the whole month too, it will jump to the end of the year field. Said that, those two simple functions have helped me make some forms really better in a ux point of view, and I would be glad if it helps more people two.

marklagendijk commented 10 years ago

Although this is definetly a common scenario, I don't feel that this functionality belong in this jQuery plugin. This plugin provides some low-level utilities, your functionality is more high level, and specific.