From: Dennis Schafroth Date: Thu, 10 Nov 2011 10:24:42 +0000 (+0100) Subject: Fix: Go now removes keyboard on iPhone X-Git-Tag: mobile-beta-1~5 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=2e65c2fe3fe72b23dd23854a84696d5f93d91545;p=pazpar2-moved-to-github.git Fix: Go now removes keyboard on iPhone --- diff --git a/www/iphone/example_client.js b/www/iphone/example_client.js index fb42b3f..18feaa9 100644 --- a/www/iphone/example_client.js +++ b/www/iphone/example_client.js @@ -57,7 +57,7 @@ function loginFormSubmit() { authCb, authCb); } -function handleKeyPress(e, formId, focusId) +function handleKeyPress(e) { var key; if(window.event) @@ -67,10 +67,10 @@ function handleKeyPress(e, formId, focusId) if(key == 13 || key == 10) { - onFormSubmitEventHandler(); - focusElement = document.getElementById(focusId); - if (focusElement) - focusElement.focus(); + button = document.getElementById('button'); + button.focus(); + button.click(); + return false; } else diff --git a/www/iphone/index.html b/www/iphone/index.html index dd565de..c12bac1 100644 --- a/www/iphone/index.html +++ b/www/iphone/index.html @@ -55,7 +55,7 @@ -->