Skip to content

Commit

Permalink
Add tab support for selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Nov 30, 2023
1 parent 13a59b7 commit 4fd3a12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/floatype.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions floatype.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ export function floatype(el, options = {}) {
if (!box) {
return true;
};

switch (e.keyCode) {
case 38: return navigate(-1, e); // Up arrow.
case 40: return navigate(1, e); // Down arrow
case 9: // Tab
case 13: // Enter
e.preventDefault();
select(cur);
Expand Down

0 comments on commit 4fd3a12

Please sign in to comment.