Disable iOS keyboard (don't show it at all) in phonegap - ios

If I were writing a native app I would try the solution given here which says:
"Try to implement the following method in text view's delegate:"
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView{
return NO;
}
Unfortunately I need to use phonegap, so I don't have a text view to manipulate. It would be great if I could permanently suppress the keyboard in this app. We've got some custom on screen keyboard that people are supposed to use instead. So, any idea how to disable the popup keyboard completely?

Just put a transparent div over the input field, so the the click will be on that div and not on the input field. Now you can activate your own keyboard by click and fill in the characters with javascript.
Update:
The following solution works:
The keyboard is directly linked to the focus on the input field. when you use readonly="true", you can get the click event and then you should be able to chamge the value. in jQuery something like this: $('myinputfield').click(function(){$(this).val(newinput);});

Related

Remove letter upper form keyboard

Is it possible to remove letter upper from keyboard ?
Not if its the standard UIKeyboard. You can roll your own keyboard that does not support uppercase. Alternatively, for an easier solution you can make all text lowercase when entered via a bit of code.
You can create your Custom Keyboard with iOS8 App Extension. Try this tutorial :
http://www.appcoda.com/custom-keyboard-tutorial/
Also check at developer.apple.com :
https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Keyboard.html
A custom keyboard replaces the system keyboard for users who want
capabilities such as a novel text input method or the ability to enter
text in a language not otherwise supported in iOS. The essential
function of a custom keyboard is simple: Respond to taps, gestures, or
other input events and provide text, in the form of an unattributed
NSString object, at the text insertion point of the current text input
object.

Detect iOS 8 Quicktype suggestion paste

For rich text editing I have a UIWebView where I load a local html content with some contenteditable div.
When user is pressing some keys on keyboard I want to detect content changes within that div, resize it accordingly and scroll properly to position cursor above the keyboard.
I'm able to do this using onkeyup event handler:
<div id="contents" onkeyup="keyup()" onpaste="paste()" contenteditable="true">...</div>
In iOS 8 keyboard now has the Quicktype panel with some suggestion words to quickly paste into editable area. How to detect the action of pasting the suggestion text into div?
Event handler like onkeyup doesn't help as the text is pasted without pressing keyboard buttons, onpaste event is not get called.
I also tried to implement MutationObserver to detect DOM changes when something is pasted - doesn't help too.
I'm struggling trying to find the working solution. Any advice is appreciated. Thanks!
In Mobile Safari the iOS 8 Quicktype words fire two (maybe identical?) input events.
Try this in the developer console:
$('input[type=text]').on("input", console.log.bind(console, "input!"));
In UIWebView I have not tried...

Corona sdk text input

I have looked at example code that uses the native textField on Android. I would like to be able to type into the text field without having to touch a button to show the text field, and then touch inside the text field to start typing. Is there a way to show the text field and set focus to it, where I can start typing without touching other buttons. I am working on an app and I don't want the users to have to take extra steps to begin typing text. Thanks for any advice.
You can call native.setKeyboardFocus(yourField) to show the keyboard.
http://docs.coronalabs.com/api/library/native/setKeyboardFocus.html

How to enter text into a textfield in a web view using UIAutomation

My iOS app has a log-in page with username and password textfields. These text fields are in a web view. I am trying to automate the log-in process with UIAutomation. I know that working with content in a web view with UIAutomation is tricky. I am able to tap into the text fields using target.tap({x:100, y:200}); but I want to have UIAutomation enter text after the field has been tapped. How can I achieve this?
You can do something like:
Get the reference to the webview
var webView=window.scrollViews()[0].webViews()[0];
Tap the textView that you want to edit:
webView.textFields()[0].tap();
Use the keyboard
UIATarget.localTarget().frontMostApp().keyboard().typeString("text");
You can use: webView.logElementTree() to find out your webview.
Yes this is quite possible but instead of going through the position of the text field, I'd suggest going through the id/name of the text field. Another approach is to traverse the application window.
Try following this apple's documentation - http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/UsingtheAutomationInstrument/UsingtheAutomationInstrument.html
This will give you a head start and many other ideas.

Safari for iPad: How to hide the Autofill Bar above the keyboard?

I'm coding an iPad application that uses a UIWebView which contains an <input> tag. It doesn't make sense in the context of the app to use AutoFill, but when editing the field, a bar appears above the keyboard with "AutoFill" and "Previous / Next".
Is there a way to tag/style the <input> so that this bar does not appear? Adding autocomplete="off" doesn't do it. Barring that, is there a way to bypass Safari's keyboard, and call out to iOS APIs to handle the text input instead? Thanks!
As far as I know, this is a feature of Mobile Safari which is under the control of the end user, and cannot be enabled/disabled by your application.

Resources