PDA

View Full Version : Html page scrolling when textfield focused, iOS



mvoss
12 Jan 2012, 1:03 PM
Hi,

I am having a strange problem where the page scrolls when a text field is focused. I have made a very simple testcase for this (see code below). The page contains only two textfields the phonegap script and the Sencha Touch 1.1.1 script (picture 1). When run in phonegap and the first textfield is focused the soft keyboard comes up and everything is fine (picture 2). But when clicking anywhere in the html document the panel scrolls to the bottom and the textfields are not visible any more (picture 3). This does not happen when I remove the Sencha Touch script, so appearantly there is something happening when Sencha Touch is inited!? Why is this happening? It does not happen with Sencha Touch forms though. Any help will be greatly appreciated!

306663066730668



<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>iAmMobile</title>



<!-- If your application is targeting iOS BEFORE 4.0 you MUST put json2.js from http://www.JSON.org/json2.js into your www directory and include it here -->
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" charset="utf-8">

function onBodyLoad() {
document.addEventListener("deviceready",onDeviceReady,false);
}




function onDeviceReady() {
navigator.splashscreen.hide();
}


</script>
</head>
<body onload="onBodyLoad()">
<input type="text" id="one" name="one" /><input type="text" name="two" id="two" />
<script type="text/javascript" charset="utf-8" src="libs/sencha-touch-1.1.1/sencha-touch-debug-w-comments.js"></script>
</body>
</html>

mitchellsimoens
13 Jan 2012, 11:27 AM
You may want to open a ticket at support.sencha.com so that they can spend the time to figure out what is going on.

mvoss
14 Jan 2012, 5:54 AM
Thank you for the quick response Mitchell. I have opened a ticket.

Regards,
Markus