Hide the keyboard on Go Button for a editbox - ipad

I'm developing a xpages mobile form to do a full-text search.
How can I hide the keyboard on a iPad, clicking Go Button when finish to write a text in a editbox and make a submit action?.
Thank you

You can hide the keyboard with the blur() method of the input box:
XSP.getElementById('view:_id1:inputText1').blur();
view:_id1:inputText1 is the client side id of your input box

Related

How to hide keyboard without closing the dialog box using Appium for IOS?

I have a dialog box that appears and while closing keyboard with hideKeyboard(); all the form is closed and i get back to the home page so that i can't continue the scenario for filling other data.
Here the screen :
Just use UIScrollView in your dialog box, and set scroll view class TPKAScrollViewController. Download class
You can fill up the fields first using driver.sendkey() then tap on keyboard next button to switch the driver to the next field untill the last field. in last field you will get done button then you can tap on that button.
The default "strategy" of hideKeyboard(); is to tap outside the keyboard, but this can be changed to pressing a key on the keyboard instead.
See the java-client documentation (assuming you're using java-client?) for available hideKeyboard strategies: http://appium.github.io/java-client/io/appium/java_client/ios/IOSDeviceActionShortcuts.html
If your app's keyboard has for example a "Next" button to close the keyboard with, then you could use: driver.hideKeyboard("Next");

Manually triggering "Done" on the iOS Safari Form Accessory Bar

How do you manually trigger the "Done" (submit) button from the form accessory bar in iOS Safari?
You can call the blur() method on the active input/select HTML element, but that does not result in the same behavior.
Problem: The HTML select element shows a UIPickerView in iOS Safari. I'm running a hybrid app where there is no form accessory bar (it's been set to hidden in the WKWebView config). If i call blur(), the select element will discard my selection. I simply want it to remember whatever was chosen in the UIPickerView and trigger an change event like it normally would if I tapped on "Done" in the form accessory bar.
Anyone?

Selection of Popup Button clearing UI Text Field

I've been developing a programming where the user can select a list of fields from popup buttons, then they press a calculate button and then depending on the choices, a string of text gets outputted to a UIText Field.
However I would like for the text field to be cleared when the user starts selecting other choices in the popup button before pressing the select button.
Is there anyway this is possible?
Just right this code in the place where that happens:
/*You can replace theTextFieldYouAreTalkingAbout with the one you are talking about*/
theTextFieldYouAreTalkingAbout.text = ""

How to show keyboard programmatically in Firefox OS?

I am working on a ToDo list app wherein I keep the focus on the textbox input after the user adds a ToDo item.
Now, the problem is, when the user adds some text input and hits the add button, the focus on the textbox is lost so the keyboard disappears and then the focus gets back to the textbox. So, the keyboard disappears and appears again in a short interval. As you can imagine, this is bad UX.
How do I set the keyboard to be shown explicitly when the focus is on the input button?
I fixed it by setting the focus onto the textbox first when I click the add button then do the actual adding stuff.

Losing Focus From A JTextField

After I use my textfield I can't get a jpanel that click on back into focus for my keylistener. It works for the mouselistener but all other keystrokes keep being detected by the textfield not the jpanel.
The panel has been setFocusable(true) and works fine until i give the textfield the keyboard focus. It's like the textfield won't release the focus.
Any suggestions?
The answer was to call requestFocus() on the panel after the text action was performed

Resources