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

Tab Navigation requires double tab press to enable physical keyboard input #744

Closed
rubenfranca opened this issue Jun 24, 2019 · 2 comments
Closed
Labels

Comments

@rubenfranca
Copy link

rubenfranca commented Jun 24, 2019

When using the same keyboard to write on different inputs, combined with alwaysOpen: true and tabNavigation: true, the navigation is not working as expected. It is required to press the tab key twice in order to write on the input with the physical keyboard. This is only happening on the inputs which have the virtual keyboard.

Steps to reproduce:

  1. Click on the first input
  2. Press tab
  3. Try to write with the physical keyboard (doesn't work)
  4. Press tab key again
  5. Try to write with the physical keyboard (works)

Here is a demo: demo

@Mottie
Copy link
Owner

Mottie commented Jun 24, 2019

Hi @rubenfranca!

Thanks for the heads-up! I'll get this fixed ASAP!

@Mottie Mottie added the Bug label Jun 24, 2019
@Mottie Mottie closed this as completed in dae3647 Jun 24, 2019
@Mottie
Copy link
Owner

Mottie commented Jun 24, 2019

Try this demo:

HTML

  First Name:
  <input type="text" class="keyboard keyboard-init-focus">
  <br/> Last Name:
  <input type="text" class="keyboard">

The "keyboard-init-focus" class ensures that the indicated input gets focused; but also make sure to set the initialFocus option to false.

JS

$(function() {
  $(".keyboard").keyboard({
    usePreview: false,
    position: {
      of: "#wrap",
      my: "center top",
      at2: "center bottom",
      offset: "0 20"
    },
    initialFocus: false,
    alwaysOpen: true,
    tabNavigation: true,
    autoAccept: true
  });
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants