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

Keyboard filtering the list doesn't work with number pad #25

Open
willberger opened this issue Dec 1, 2014 · 1 comment
Open

Keyboard filtering the list doesn't work with number pad #25

willberger opened this issue Dec 1, 2014 · 1 comment

Comments

@willberger
Copy link

For example if you press "1" on the num pad String.fromCharCode(e.which) will return "a"

@willberger
Copy link
Author

Possible fix (works but probably needs more testing):

var parsedChar = String.fromCharCode(e.which);
if (e.which > 95 && e.which < 106) {
parsedChar = (e.which - 96).toString();
}
// Append the data-filter with typed character
$sod.data("filter", $sod.data("filter") + parsedChar);

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