This is a migrated thread and some comments may be shown as answers.

iPhone Soft Keyboard "Search" Button Problems

1 Answer 118 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jesse Herrera
Top achievements
Rank 1
Jesse Herrera asked on 16 Sep 2013, 06:47 PM
I am getting inconsistent behavior with the iPhone soft keyboard "Search" button. On the first tab, the first time I click the "Search" button it refreshes the screen and redisplays my input textbox with the text removed. The next time I click "Search" it does a proper search, executing my AJAX script and displaying the search results. When I click to the second tab and click the "Search" button I am told the connection to the server was lost. I am having a lot of problems with the soft keyboard functionality integrating with my application. When I don't click any of the "Search", "Go", etc. buttons on the soft keyboard my app works without error.

I have a tabbed application with an input field on each tab. I removed the "type=submit" from both input fields and am capturing the keyup keycode=13 based on the visible tab. Any clues would be appreciated.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Jesse Herrera
Top achievements
Rank 1
answered on 16 Sep 2013, 07:06 PM
I seem to have stumbled upon a hack that makes the soft keyboard work much better with my app. I had to add:

onsubmit="return false;"


to the <form> tag around my input field. Once I did this the jQuery I have capturing the button keycode and executing the AJAX is working as expected. I'll keep testing.
Tags
Report a bug
Asked by
Jesse Herrera
Top achievements
Rank 1
Answers by
Jesse Herrera
Top achievements
Rank 1
Share this question
or