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 only works with elements created before calling init function #3

Closed
avallcanera opened this issue Nov 14, 2018 · 2 comments
Closed
Labels

Comments

@avallcanera
Copy link

avallcanera commented Nov 14, 2018

Hi! Thanks for your excellent work, I love your plugin :)
I found an issue: the keyboard only works with elements created before calling init function. If you create a new input dinamically (for example inside a modal box) the keyboard doesn't works.
You should change the following code (jqkeyboard.js, line 433):
<========
$(allowedElements).focus(function () {
EventManager.$activeElement = $(this);
});
========>
$(document).on('focus',allowedElements,function () {
EventManager.$activeElement = $(this);
});
This fix the problem.
Thanks again!

All the best,
Alejandro Vallcanera

@hawkgs
Copy link
Owner

hawkgs commented Nov 14, 2018

Thanks for submitting the issue. I'll take a look at it 🙂

@hawkgs hawkgs added the bug label Nov 14, 2018
@hawkgs hawkgs closed this as completed in 0c389c3 Dec 2, 2018
@hawkgs
Copy link
Owner

hawkgs commented Dec 2, 2018

By the way, feel free to submit PRs for that matter.

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