Note that there are some explanatory texts on larger screens.

plurals
  1. POgetting logcat message ignore this event while code works correctly for browser
    text
    copied!<p>I have a login form in my phone app and in that I need to initially place my form elements in center of the screen and later when some one tries to enter inputs to login name or password the input block get shifted upwards so that it does not get hidden by the keypad. Though my code works fine in browser, in phonegap I get ignore this event. Please guide</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;daDrive - Login&lt;/title&gt; &lt;script type="text/javascript" charset="utf-8" src="../cordova-2.5.0.js"&gt;&lt;/script&gt; &lt;script src="../js/jquery.js"&gt;&lt;/script&gt; &lt;script src="../js/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script src="../js/jquery-ui-1.10.3.js"&gt;&lt;/script&gt; &lt;script src="../js/jquery.mobile-1.3.1.min.js"&gt;&lt;/script&gt; &lt;script src="../js/code/util.js"&gt;&lt;/script&gt; &lt;script src="../js/code/login.js"&gt;&lt;/script&gt; &lt;script src="../js/code/register.js"&gt;&lt;/script&gt; &lt;script src="../js/code/account.js"&gt;&lt;/script&gt; &lt;script src="../js/code/home.js"&gt;&lt;/script&gt; &lt;script src="../js/code/constants.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="../css/common.css" /&gt; &lt;link rel="stylesheet" href="../css/jquery.mobile.theme-1.2.0.min.css" /&gt; &lt;link rel="stylesheet" href="../css/jqm-docs.css"/&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $("input").focus(function(){ if(flag==0){ flag=1; $("#loginPass_txtboxes").animate({"margin-top": "-=30%"}, "slow"); } }); document.addEventListener('click', function(e) { e = e || window.event; var target = e.target || e.srcElement; if(target.nodeName.toLowerCase()!="input" &amp;&amp; flag==1){ flag=0; $("#loginPass_txtboxes").animate({"margin-top": "+=30%"}, "slow"); } }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div data-role="page" id="page_id"&gt; &lt;div id="loginPageLogo" style="margin-top:3%;"&gt; &lt;center&gt;&lt;img src="../images/logo_dadrive.png"/&gt;&lt;/center&gt; &lt;/div&gt; &lt;div data-role="content" id="main_page" style="padding:0 !important;"&gt; &lt;div id="login_middle_content"&gt; &lt;div id="loginPass_txtboxes" style="width: 60%; margin-left: 20%; margin-top:35%" onblur="shiftDown()"&gt; &lt;div data-role="fieldcontain" class="ui-hide-label" &gt; &lt;label for="LoginId"&gt;Login ID:&lt;/label&gt; &lt;input type="text" name="LoginId" id="LoginId" value="" placeholder="Login Id" data-mini="true"/&gt; &lt;/div&gt; &lt;div data-role="fieldcontain" class="ui-hide-label"&gt; &lt;label for="password"&gt;Password:&lt;/label&gt; &lt;input type="password" name="password" id="password" value="" placeholder="Password" data-mini="true"/&gt; &lt;/div&gt; &lt;/div&gt; &lt;div align="center"&gt; &lt;a href="javascript:login();" data-role="button" data-theme="b" id ="button_size"&gt;Login&lt;/a&gt; &lt;/div&gt; &lt;/div&gt;&lt;!--middle--&gt; &lt;/div&gt; &lt;/div&gt;&lt;!--page --&gt; &lt;/body&gt; </code></pre> <p></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload