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

Needs to select() inputs that receive focus #3

Closed
davidtheclark opened this issue Feb 9, 2016 · 0 comments
Closed

Needs to select() inputs that receive focus #3

davidtheclark opened this issue Feb 9, 2016 · 0 comments

Comments

@davidtheclark
Copy link
Collaborator

Because the plugin is using event.preventDefault() to control focus, it is preventing the default behavior of selecting an input when that input receives focus from a tab.

This is easily restored by changing the tryFocus function to:

function tryFocus(node) {
  if (!node || !node.focus) return;
  node.focus();
  if (node.tagName.toLowerCase() === 'input') node.select();
}
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