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

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.

Related

How do you get the previous/next/done buttons in Mobile Safari date input?

I know I've seen the date picker for iOS with "Previous", "Next" and "Done" buttons before, but for some reason all I'm seeing is the "Clear" button on a standard date input in Mobile Safari. Just wondering if there is a way to enable these other buttons somehow.
According to my testing the Next, Prev and Done buttons appear only on iPhone devices, on iPad there's only Clear button for <input type="date"></input> control.

JQuery Mobile: how to disable default keyboard when clicking in text field?

I am currently using input text fields that spawn a chooser (listview with various entries) when they are clicked on. Testing this on the appMobi emulator works flawlessly; however, when testing it on an iPhone, the default keyboard appears when the text fields are touched and then quickly disappears to be replaced by the chooser.
Is there a way I can prevent the default keyboard from showing with JQM?
If they require user input, then you can't prevent the browsers' default implementation (at least in a x-browser friendly way). They is certainly no solution with JQM.
I suggest you style your own text box from a div or similar, using html/css. With js you can then wire up the chooser to this element.

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

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);});

jQuery Mobile Force hide soft keypad on focusing text input field

I have a date field on a PHP website and I'm using jQuery Mobile for mobile site.
While browsing the site on a mobile browser, (eg firefox mobile on android), on clicking on the date text input, the calendar dialog comes up, but the soft keyboard also comes up on my android (Soft keypad comes up whenever one focuses on a input field)
Is there a way, I can force hide the soft keyboard ? Is there a generic javascript based trick to force hide the soft keypad (that works on all mobile devices like iphone, android etc ?
I'm using the jQuery Mobile datepicker from here
TIA
A more simple solution is to add readonly="true" to the input boxes that you have the datepicker attached to. Even though you can't manually type in a date, on mobile you won't have to deal with the keyboard popping up and getting in the way
Just found an answer to my question. (Guess I didn't search with the right keywords earlier :-|)
Adding a jQuery blur event on focus solves the issue.
Thanks to this post by Danny C
My workaround (though I am using a different plugin: the datebox from jtsage.com) is currently the following:
set a disabled attribute on the input
bind a click handler to the input or its parent
the click handler triggers .datebox('open') on the selected element
This way there is no focus element so no triggering of Android soft keyboard.
add the readonly attribute to your date box. (or readonly="readonly") input type="text" data-role="date" readonly
For JQM add the folloiwing files jqm.datepicker.css , jqm.datepicker.theme.css , jqueryUI.js , jqm.datepicker.js

autofocus with keyboard in an ipad html5 site

I'm working on an html5 app that will be used on iPads in a kiosk mode. The first thing users must do is sign in, so when the homepage loads, I'd like the onscreen keyboard to popup with the focus in the first field.
I've tried all the variants I can think of, including
html5 <input autofocus> attribute
calling document.getElementById("nameFirst").focus() in window onload
same as the previous, but the onload calls a timer method to invoke the focus call later
Has anyone figured out how to make the keyboard automatically appear?
Mobile Safari doesn't allow keyboard showing up without user touching text input element. I think it's by design.
http://www.quora.com/Mobile-Safari-iPhone-or-iPad-with-Javascript-how-can-I-launch-the-on-screen-keyboard

Resources