-
Notifications
You must be signed in to change notification settings - Fork 723
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
Disabling ios keyboard when init keyboard on dynamically added input #295
Comments
Hi @kerv! Honestly, I'm not sure what to tell you... I'll had to snag my old iPad to test that demo (v5.1 Safari). The initial demo you sent appears to open the iOS keyboard on both the in-place input and dynamically added inputs. Though, when I set the Maybe stuff has changed in newer versions/devices? I don't own any other iOS devices to be able to test this. |
Hi Rob, Thanks for looking into this. I spent a few hours looking through your init code but no luck yet. It's something that iOS must do when attaching an input to the page. The only thing I thought I could do was possibly write a "reset" bindings command, whereby I could add my own classes/popup attributes to an input manually and then call this "reset" bindings (by passing in the jquery selector of the input) and perhaps at this point, it would work as intended. I'm not 100% sure though. I'll keep digging and let you know if I find anything. Other than that, your keyboard works great on the iPad as long as you initialize things right on page load the very first time. Regards, |
Oh I think I finally found a solution (source)! (demo) If you set both the $(function () {
$('#test')
.prop('enabled', false)
.keyboard({ lockInput: true });
}); You have to set both; but I think the |
HI Rob, Yep - still doesn't work on the latest iPad. It is so subtle for when the iOS keyboard, it literally flickers about 10px at the bottom of the iPad screen and then disappears. Sometimes it is so fast you don't even notice and other times it is slower. It's more apparent when you add multiple inputs at once in the add button, even with the prop('enabled', false) in there. I'm still investigating here. |
I have a custom layout which uses preview and lockInput: true. In jquery.keyboard.js, after line 336 I added
which solved this issue for me |
This comment has been minimized.
This comment has been minimized.
Hi @mattriverm! That bit of code already exists within the plugin - line 362 @buildAll I have no idea why you posted your online editor/JSON question here. Have you tried Stack Overflow? |
An update. |
When initializing the keyboard with an input that is dynamically added to the page, the iOS keyboard appears for a brief second and then disappears. It is as if the code focuses the input while the keyboard is initializing. This occurs even if the input is added as readonly or disabled.
I'm building a page that adds several inputs and initializes the keyboard on all of them. For each one, the ios keyboard appears briefly and then shows the mottie keyboard. It's visually rather annoying :).
Any ideas? http://jsfiddle.net/kerv/hyc1x50b/3/
HTML
JS
The text was updated successfully, but these errors were encountered: