One: Bring up the system with enter key keyboard
In the project there are often input boxes, when the input is completed click OK to perform the corresponding action. However, some of the design is not determined or search button, this need to call the system keyboard, click on the system keyboard to perform the corresponding action.
But the simple input is not possible, to call the keyboard with a carriage return must put input in the form form can be, and have to add action (must add), the following is a simple example.
<formAction Class= "Search"onsubmit= "return false;"> <Iclass= "fa fa-lg fa-search"></I> <inputtype= "text"class= "Search-input"placeholder= "Search"><Iclass= "fa fa-lg fa-times-circle clear-search"></I></form>
Here, in order to avoid the page refresh caused by the form submission, add a onsubmit= "return false;".
Second: Hide the system keyboard after canceling
If you want to cancel the cursor on your PC, you can click on any other part of the page, but clicking on other unbound events on your phone will not remove the cursor. Here are three ways to
Hide the keyboard and choose the simplest one on the project.
1. The simplest one, direct <a href= "javascript:" class= "Search-close" > Cancel </a>
2. Use JS or JQ directly to lose focus on the input box, you need to bind an active Defocus event.
3. Set a label that is not a label, arbitrarily binding a click event can be, even if the method does not write anything.
Mobile input gets focus after popup with enter (similar to search, OK, go to) keyboard, as well as hide system keyboard