Forum Post: RE: How to make the searchbar search on keyboard enter button

  • Thread starter Thread starter egarcia
  • Start date Start date
Status
Not open for further replies.
E

egarcia

Guest
Hello, The search component is based on jQuery. I noticed that the generated code uses type="text" which means that the mobile OS would use a regular keyboard for input. (If type was "search" then the mobile OS would have a hint to use a keyboard with the Search button.) The approach that you are using with keypress seems to be the right approach. It should work with your web browsers and mobile devices. To figure out which key was pressed, use the arguments reference. Example: alert("DEBUG: Keypress: " + arguments[0]["keyCode"]); Best regards.

Continue reading...
 
Status
Not open for further replies.
Back
Top