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

Added delete key to the firefox routine. #9

Closed janb84 closed 10 years ago

janb84 commented 10 years ago

The delete key didn't function correctly in firefox, this change fixes this.

Mathachew commented 10 years ago

This will fix the issue while reintroducing a bug I fixed with the removal of keyCode 46. Not sure why I didn't pick up on this sooner, but the keydown and keypress events do not report the same character codes for every key. In IE and Chrome, special keys don't trigger keypress, but in Firefox, both del and . report keyCode 46. I'm thinking the only real solution is to store the keyCode from keypress and compare the value later, which I don't care for. I also never cared for comparing the keyCode, so maybe I can think of something more effective. I'll have a solution out sometime today or tomorrow to address this.

Mathachew commented 10 years ago

@A-S-Blom Thanks for the feedback. I was able to improve Autotab's behavior (99e8f260ff9259b921bc2526808859b515298692) when working in Firefox; among the improvements was the delete key working as expected. I'm about to create a 1.4 release, which also now has intelligent pasting.

janb84 commented 10 years ago

@Mathachew didn't know the double keycode issue in firefox. For my project the . wasn't necessary. Glad you have fixed it.

Keep up the good work!

Mathachew commented 10 years ago

Thanks!

It's probably not common, but there have been inquiries about it. Because of that, I decided to include it in my custom regular expression example in demo.html.