cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafael Schettino (JIRA)" <>
Subject [jira] [Commented] (CB-4940) iOS7 Keyboard Appearance Resizes View Frame
Date Mon, 28 Oct 2013 17:44:34 GMT


Rafael Schettino commented on CB-4940:

I fixed this issue on my project by javascript.
On index.html, I added onResize function on the body tag:
<body onResize="onResize();">
On my global script file, I added this code:
function onResize(){
	var ios7 = (device.platform == 'iOS' && parseInt(device.version) >= 7);
	if (ios7){
		var height = $('body').height();
		if (height < 350){ // adjust this height value conforms to your layout
		else {

> iOS7 Keyboard Appearance Resizes View Frame
> -------------------------------------------
>                 Key: CB-4940
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 3.0.0
>         Environment: XCode 5, iOS 7, Phonegap 3, Sencha Touch 2.1
>            Reporter: Brad Pritchard
>            Assignee: Andrew Grieve
>         Attachments: iOS Simulator Screen shot Sep 27, 2013 2.47.47 PM.png
> This is a similar issue to CB-3020, albeit slightly different.
> Our situation is this: we have a PhoneGap 3.0 project, using Sencha Touch as the view
framework. Our views are housed within a Sencha Touch TabPanel, which shows tabs docked at
the bottom of the viewport.
> Since we do not want the screen to shrink, we are setting KeyboardShrinksView to false
in our config.xml.
> When an input receives focus, we are seeing that iOS 7 resizes the viewport to be the
size of the screen minus the height of the keyboard. Since the TabPanel is absolutely positioned
with a bottom of 0, the tabs are fixed right above the keyboard.
> We would like the webView to remain the same size, and the focused input to scroll into
view when clicked. The assumption here would be that either:
> # The viewport needs to be re-expanded after the keyboard shows to get it back to the
height of the screen (and thus pushing the tabs "below" the keyboard), or
> # The webView and/or scrollView need to be manipulated after the keyboard shows, so that
the content of the app (namely the TabPanel) scrolls off the bottom of the shrinked viewport,
and thus out of the way.

This message was sent by Atlassian JIRA

View raw message