Disabled keyboard state in iOS 6? - ios5

I have implemented a "token" or "chip" text field similar to the stock messaging apps where a user enters entries which become colored tokens. When a user presses backspace, it highlights the token, and one more backspace deletes it. This all works great on iOS 5.
On iOS 6, however, once my tokens (UIView-based) are highlighted, and they call becomeFirstResponder, the keyboard becomes disabled as seen below. When testing in the simulator using the "hardware keyboard", things still work fine, but a real user on device cannot press backspace again since it is disabled.
How does one avoid this? What calls/properties should I even be looking for? In my research I am unable to find what this mode is called or how it is used.
Thanks!

Related

On a SecureField in SwiftUI How do you remove the password fill box on OSX?

I cannot figure out how to remove this Passwords autofill box in SwiftUI when building for macOS. I have tried different kinds of textContentType but nothing gets rid of this box. It is blocking my attempt to login to my app from a return press. Both the onCommit, or the keyboardShortcut modifier return press is being swallowed by this box. The strange thing is, I create a blank new app with one SecureField, and the box is not there. I am wondering if there is some kind of initial setup telling the app to use suggested passwords? I know in the past our team looked at password autofill and supporting Associated Domains.
I managed to prevent the "Passwords…" box from appearing on my app by making two things:
Passing .username to the .textContentType(_:) modifier of the email TextField.
Passing nil to the .textContentType(_:) modifier of the password SecureField.
I tested this solution on macOS 12.4 and Xcode 13.4.1 (13F100).

click action not performed due to Softkeyboard enable(Hide the keyboard also its not working) but test is passed

I tried get login into my account using this capabilities
Android version-7.0
Appium version - 1.71
java-client - 5.8.0
selenium-standalone server -3.52.0
1.first username, password entered successfully using selenium
2.while entering password soft keyboard was enabled but I did hide keyboard also
3.But I clicked login but it is passed but where it is clicked I don't know
(I thought it might be soft keyboard issue)
Please let me know why the action not performed.
Is a native app, hybrid, web? Paste what you got until now...
Anyway, if you searched the element before the software keyboard is hidden and you try to click it after the keyboard is not longer visible... Then you could have a problem.
Add a delay for a few seconds and search again for the element and try clicking
What are you using to hide keyboard? I guess -> driver.hide_keyboard() method? Have you tried doing click at X, Y coordinates like 10,10 that are obviously out of the keyboard(for example...). Or have you tried simulating terminal back button? -> driver.back()
If 1. and 2. are not working, why don't you try with capabilities -> 'unicodeKeyboard' and 'resetKeyboard' setted to true?
You will need to provide more information to be able to help. Then I will edit my answer with code and examples

On Android or iOS - how to approach the possibility of a service or app going into a broken state

...and this broken state persisting until a device restart, since a naive attempt to restart an app would not work. Many users are not savvy enough to know how to terminate services/backgrounded apps. If the user can't (or doesn't 'need to') close apps, then what about restarting apps which have gone wrong? ( It can happen :) ) If my app goes wrong on someone's phone and they cannot easily restart the app without restarting the phone, that seems like a problem. I am aware that apps and services can be terminated by navigating system menus or double tapping the home button etc. but - many users are not aware of these features. For this reason I am thinking of adding an explicit close button to my app which will kill everything to the best of my ability, such that on a subsequent launch the program runs from the beginning again. I realise this is not the 'recommended' approach. Thoughts?
Thoughts?
Don't do it. Instead you should put a FAQ entry on your apps website that says.
Q: My app does not run anymore. HELP!
A: First you should try to restart the app. If that doesn't work feel
free to contact me.
Here is how you do this on the iPhone,
iPad or iPod.
double press the home button. the
multi tasking bar appears.
[ some screen shots ]
long press the app icon and press the
little x that appears on the icon.
[ more screenshots ]
If you want to put buttons for functions that are not obvious for many users you end up with a button for everything. And I (as somebody who knows every function) don't want a button cluttered user interface.
You would be surprised how many emails I get about "how can I zoom?" (A: Pinch your fingers) or "how do I delete an entry (in a tableview)" (A: Swipe your finger over the entry from left to right, and press the red delete button).
If I get an email about this I just point them to the faq which has some nice screenshots.
Btw, if the "broken state" happens so often that you would consider adding a special button I would check my code for bugs again.

Detecting iPad keyboard hide versus external keyboard connect?

The iPad virtual keyboard will disappear in one of (at least) these 3 circumstances:
If the control (say, a UITextField) programmatically resigns first responder.
If the user taps the "dismiss keyboard" button in the lower right.
If the user connects to the USB/keyboard dock peripheral.
In all cases, I get the UIKeyboardWillHideNotification.
The problem is that the first two cases are generally equivalent-- in other words, the user is done editing the text field. But in the third case, the text field is still being edited, just from another input source.
The problem is detecting the difference between cases 2 and 3. All I get in both cases is UIKeyboardWillHideNotification. In case 2, I generally want to also lock the edit control and commit the value. In case 3, I generally want to do nothing and allow editing to continue.
But how can I tell the difference?
Apple's Pages app seems to be able to distinguish this on document-title renaming.
I would look at the UIKeyboardBoundsUserInfoKey passed with the notification. The physical keyboard probably has empty bounds.
It sounds like you're just trying to figure out when a user is done editing. You could listen for the UITextFieldTextDidEndEditingNotification notification for cases 1 and 2.
A much simpler solution would be couldn't you just check against the editing property of UITextField to determine if it's still supposed to be editing or not? I don't have a physical keyboard, so I have no way to test this. I'm just guessing.
Here's a link to the documentation on that property: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITextField_Class/Reference/UITextField.html#//apple_ref/occ/instp/UITextField/editing
I'm very curious to know if this works or not... :)

Controlling initial shift status (and layout?) of iPhone keyboard from web form

I would like to be able to control the initial shift state of the iPhone keyboard from a Javascript prompt (updates added for web forms). It seems to mostly default to an initial capital but I feel sure I've typed into/seen prompts that are initially lower-case. I also feel sure that I've seen custom layouts used from the web.
Googling around initially (see updates) didn't reveal any obvious documentation or previous answers besides saying that having "phone" or "zip" in the class of the input would bring up the numeric keyboard (although this may have stopped working). Apparently "url" or "email" could select the appropriate layouts also. This obviously doesn't apply to javascript prompts, and may not work in some versions.
Is there any official source for all this stuff? Does it work across all firmware versions? Has anyone got a general solution for changing keyboard layout or for doing this in Javascript prompts?
UPDATE
For web forms: found this from Apple straight after posting the question, along with this. The question still stands for Javascript prompts.
UPDATE 2
Doh! This is also useful; placeholder text and search button not mentioned in the Apple links. Some more relevant info here.
How do I control which keyboard is displayed when a user touches a text field?
You can control which type of keyboard is displayed when a user touches a text field in a web page. To display a telephone keypad, an email keyboard, or a URL keyboard, use the tel, email, or url keywords for the type attribute on an input element, respectively. To display a numeric keyboard, set the value of the pattern attribute to "[0-9]" or "\d".
These keywords and the pattern attribute are part of HTML 5, and are available in iPhone OS 3.1 and later. See Listing 15 to see how to display each type of keyboard, including the standard keyboard.
Listing 15: Controlling keyboard display
Text:
Telephone:
URL:
Email:
Zip Code:
See http://developer.apple.com/library/safari/#codinghowtos/Mobile/UserExperience/index.html