Since the latest update to Swiftkey Keyboard, the backspace key event is not properly recognized / fired.
An eventfilter added to the input node showed that you have to hit backspace several times, until the corresponding key event gets fired.
This effect only occurs when you try to delete letters. Deleting numbers is working fine.
(Android version 7.0)
Related
When a real device is connected to my Mac and while running it, the behaviour of UIMenuController appears to be correct. That is, copy/cut actions aren't displayed for empty text field. Whereas, after stopping the run, and relaunching it once again: the menu controller for empty textfield contains cut/copy and other actions as well.
When we have an empty textfield => only paste option should be visible.
When we have a non-empty textfield => cut/copy/paste all options should be visible.
I've taken over the work on an iOS app, I've managed to work quite well with it thus far adding new functionality despite not being a trained iOS developer. However I've hit a patch where I simply cannot get the keyboard to show on screen when I tap on a UITextfield, there are areas of the app where it works but any new areas I add this simply will not work. Is there a standard bit of code that controls showing the keyboard when you tap a text field?
Need help
Keyboard opens up automatically unless you forced to not open.
You can check following, See screenshots.
Enable is checked
User Interaction Enable is checked
If you are checking on simulator try “command + k” from keypad
textFieldShouldBeginEditing delegate returns TRUE
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
return TRUE;
}
Are you running on a simulator or a real device?
I am using XCTest to test my IOS app.
As part of a test case I need to enter a number into a field (which is not a text box)
When I record the test, following code is generated when I use the soft keyboard on the simulator(IPAD/IPhone)
app.staticTexts["0"].tap() //Line 1
app.typeText("23") //Line 2
When I execute the test, the soft keyboard pops up after Line 1. But when Line 2 is executed, following error appears
UI Testing Failure - Neither element nor any descendant has keyboard focus
My app requires to be installed on IPads/IPhones. So I need to make it run through the soft keyboard route only.
So I think typeText is not the correct method. What is the method to simulate clicks on a soft/virtual keyboard in an IOS simulator?
You need to call typeText() on the element with keyboard focus, not just app.
If the element was a text field, you would find the text field element and call typeText() on that.
let element = app.textFields["myTextField"]
element.typeText("23")
You will need to replace the query with your own one for finding the element which has keyboard focus. Usually, this would be a descendant of UITextField but you will need to use a more custom query if you are using a custom view instead.
There's a bucketload of previous questions/answers about this already.
"Can't find keyplane that supports type 4 for keyboard
iPhone-Portrait-NumberPad; using
563160167_Portrait_iPhone-Simple-Pad_Default"
However all the answers involve changing a setting on the simulator, but I'm not using the simulator, I'm getting this message in the console when running on a phone.
There's also a few more answers when the issue arose trying to change the return key on the keyboard, but I'm not doing that either.
All I have is two UITextFields, one sets the keyboard entry type to UIKeyboardTypeNumberPad and the other uses the default keyboard type. That's it.
Then the message appears in the console when the text field set to UIKeyboardTypeNumberPad becomes the first responder.
If I change it to UIKeyboardTypePhonePad, then the message becomes
Can't find keyplane that supports type 5 for keyboard.
A numeric keypad will appear in both instances however it takes a very long time to do so, quite a few seconds.
If instead of specifying a numeric keypad the UITextField just uses the default keypad then it dose not have this long delay time before it appears.
[XCode 7.3, iPhone 6, iOS 9.2.1]
When using an external keyboard, my UITextView fires a shouldChangeTextInRange message just fine when I press the Backspace key ("backward delete"), but if I press Delete ("forward delete") then the method is never called at all, despite the view's text changing as expected. In case it matters, I'm using Swift and the latest iOS simulator.
If this is expected behavior, can someone point me to the documentation that explains it?
More importantly, is there a workaround?
Edit: submitted rdar://18909378. I've also discovered the same behavior when using cmd+backspace and opt+backspace. Very annoying!
I'm still seeing this issue on iOS 10. The best workaround I've come up with is to listen to the field's UIControlEventEditingChanged event and grab textField.text from there. This gives you the updated contents, but doesn't allow you to prevent the delete action like shouldChangeCharactersInRange does.