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
Prevent auto-focus of input when set alwaysOpen to true #150
Comments
That may be a bit difficult to accomplish "neatly". The only way I can think of to not auto-focus would be to rewrite the plugin with another option to not auto-focus, or clear the focus after the keyboard has been initialized. The ugly part of it is that you'd need to use a setTimeout to clear it (demo). $('#keyboard').keyboard({
alwaysOpen: true,
initialized : function(e, keyboard, el) {
setTimeout(function(){
keyboard.$preview.blur();
}, 550); // use 550 because internally it uses 500 (for IE)
}
}); This isn't a very clean solution to me, but I've been extremely busy lately and haven't had much time to work on projects, so I'll look into adding an option when I have some time. |
Once again, thanks for your quick response. I tried your approach, but it I understand your difficulty, no problem - but just in case it becomes Cordially, On Wed, Mar 27, 2013 at 2:22 PM, Rob G notifications@github.com wrote:
|
I'll try to look at this for you some time later today. |
Thanks a lot.:) Cordially, On Wed, Mar 27, 2013 at 8:37 PM, Rob G notifications@github.com wrote:
|
I'm guessing this issue has been resolved with the addition of that new option, so I'm closing it. I hope it works for you! |
I have a similar problem. I do want it to focus on an input, but the first one (keyboard) not the last one. HELP! |
I want the keyboard to stay open all the time, so I set alwaysOpen to true. The side effect, however, is that when the page is loaded it is automatically focused on the input, which is not what I want. I'd prefer the page to load normally so that the user is shown the top of the page first, and not the middle of the page, where the input is situated. Is there anyway I can accomplish that? Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: