Mathachew / jquery-autotab

A jQuery plugin that provides auto tabbing and filtering on text fields in a form
http://autotab.mathachew.com/
366 stars 98 forks source link

Key filtering doesn't work on several HTML5 input types #87

Closed patstuart closed 8 years ago

patstuart commented 9 years ago

If the input type is set to 'tel', 'email', and presumably the other HTML5 text-like input types (http://www.w3schools.com/html/html_form_input_types.asp), filtering doesn't work for key presses. It does still work for paste and drop.

Mathachew commented 9 years ago

@patstuart Please see the notes in the Known Issues section

patstuart commented 9 years ago

Perhaps it would be helpful to leave a note that version 1.8 doesn't seem to have this problem.

Mathachew commented 9 years ago

Are you sure? There's a check here that prevents anything from being filtered if it's not a text, password or textarea. That full check was added in 1.7, but originated with checking text types in 1.5.4, then password types in 1.6. It's been a few months, but last I checked, none of the HTML5 input types supported selection, which is critical for the filtering feature. I'd love for these other input types to be supported, but the additional logic that makes the filtering tool behave logically leans heavily on selection support. I could possibly explore limited filtering that doesn't attempt to move the cursor around, but I'm inclined to think that it would result in some quirky behavior.