You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Adam Arsenault (Created) (JIRA)" <ji...@apache.org> on 2012/02/05 08:47:58 UTC
[jira] [Created] (CB-221) iOS Orientation Change Doesn't Resize
WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
iOS Orientation Change Doesn't Resize WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
------------------------------------------------------------------------------------------------
Key: CB-221
URL: https://issues.apache.org/jira/browse/CB-221
Project: Apache Callback
Issue Type: Bug
Components: iOS
Affects Versions: 1.4.0
Environment: Mac OS X Version 10.6.8. xCode 4.2. Sencha Touch 1.1
Reporter: Adam Arsenault
Assignee: Shazron Abdullah
I am using Sencha Touch 1.1 inside Phonegap 1.4.1 and the recent iOS orientation change fix works for me when using the iPhone 5.0 simulator but DOES NOT work as expected for me in older simulators like 4.2 or 4.3.
Debugging Info:
I am noticing that when using the older simulators, ie 4.2, 4.3 the inner web view does not seem to resize to the full width. I attached an on window resize event inside my app and for both portrait and landscape orientations, the width is 320 instead of being 320 for portrait and 480 for landscape. The height does change though. I am seeing 300 for landscape and 460 for portrait.
I upgraded from phonegap 1.0 today and this was working as expected in 1.0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-221) iOS Orientation Change Doesn't Resize
WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202976#comment-13202976 ]
Shazron Abdullah commented on CB-221:
-------------------------------------
Wow - major bug here - good catch Adam.
In PGViewController, didRotateToInterfaceOrientation is totally missing - so the orientationchange event will not be fired at all. I found the culprit by backtracking why PhoneGap.fireEvent was never called for an orientation change. In iOS 5 it works because by the UIWebView has this event built-in. This is currently broken for iOS 3 and 4.
The patch is to add this to PGViewController.m:
{code}
/**
Called by UIKit when the device starts to rotate to a new orientation. This fires the \c setOrientation
method on the Orientation object in JavaScript. Look at the JavaScript documentation for more information.
*/
- (void)didRotateFromInterfaceOrientation: (UIInterfaceOrientation)fromInterfaceOrientation
{
int i = 0;
switch (self.interfaceOrientation){
case UIInterfaceOrientationPortrait:
i = 0;
break;
case UIInterfaceOrientationPortraitUpsideDown:
i = 180;
break;
case UIInterfaceOrientationLandscapeLeft:
i = -90;
break;
case UIInterfaceOrientationLandscapeRight:
i = 90;
break;
}
NSString* jsCallback = [NSString stringWithFormat:@"window.__defineGetter__('orientation',function(){ return %d; }); PhoneGap.fireEvent('orientationchange', window);",i];
[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
}
{code}
> iOS Orientation Change Doesn't Resize WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
> ------------------------------------------------------------------------------------------------
>
> Key: CB-221
> URL: https://issues.apache.org/jira/browse/CB-221
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.4.0
> Environment: Mac OS X Version 10.6.8. xCode 4.2. Sencha Touch 1.1
> Reporter: Adam Arsenault
> Assignee: Shazron Abdullah
> Labels: iOS4, patch
>
> I am using Sencha Touch 1.1 inside Phonegap 1.4.1 and the recent iOS orientation change fix works for me when using the iPhone 5.0 simulator but DOES NOT work as expected for me in older simulators like 4.2 or 4.3.
> Debugging Info:
> I am noticing that when using the older simulators, ie 4.2, 4.3 the inner web view does not seem to resize to the full width. I attached an on window resize event inside my app and for both portrait and landscape orientations, the width is 320 instead of being 320 for portrait and 480 for landscape. The height does change though. I am seeing 300 for landscape and 460 for portrait.
> I upgraded from phonegap 1.0 today and this was working as expected in 1.0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-221) iOS Orientation Change Doesn't Resize
WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
Posted by "Adam Arsenault (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202536#comment-13202536 ]
Adam Arsenault commented on CB-221:
-----------------------------------
I have sent a test project using Sencha Touch 1.1 and Phonegap 1.4.1 with screenshots to Shazron that demonstrate the problem I am seeing. Hopefully this should make it easier to debug and resolve. Two things to note in the project are:
1. In iOS 4 the fullscreen panel does not resize to be fullscreen when the phone is rotated to lanscape orientation.
2. The client "orientationchange" event on the root panel does not get called in iOS 4
This is not an issue on iOS 5
> iOS Orientation Change Doesn't Resize WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
> ------------------------------------------------------------------------------------------------
>
> Key: CB-221
> URL: https://issues.apache.org/jira/browse/CB-221
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.4.0
> Environment: Mac OS X Version 10.6.8. xCode 4.2. Sencha Touch 1.1
> Reporter: Adam Arsenault
> Assignee: Shazron Abdullah
> Labels: iOS4, patch
>
> I am using Sencha Touch 1.1 inside Phonegap 1.4.1 and the recent iOS orientation change fix works for me when using the iPhone 5.0 simulator but DOES NOT work as expected for me in older simulators like 4.2 or 4.3.
> Debugging Info:
> I am noticing that when using the older simulators, ie 4.2, 4.3 the inner web view does not seem to resize to the full width. I attached an on window resize event inside my app and for both portrait and landscape orientations, the width is 320 instead of being 320 for portrait and 480 for landscape. The height does change though. I am seeing 300 for landscape and 460 for portrait.
> I upgraded from phonegap 1.0 today and this was working as expected in 1.0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CB-221) On an orientation change, the
orientationchange event not fired on iOS 3 and 4 (it is however fired on
iOS 5)
Posted by "Shazron Abdullah (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah resolved CB-221.
---------------------------------
Resolution: Fixed
> On an orientation change, the orientationchange event not fired on iOS 3 and 4 (it is however fired on iOS 5)
> -------------------------------------------------------------------------------------------------------------
>
> Key: CB-221
> URL: https://issues.apache.org/jira/browse/CB-221
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.4.0
> Environment: Mac OS X Version 10.6.8. xCode 4.2. Sencha Touch 1.1
> Reporter: Adam Arsenault
> Assignee: Shazron Abdullah
> Priority: Blocker
> Labels: iOS4, patch
> Fix For: 1.5.0
>
> Attachments: Landscape iOS 4.png, Landscape iOS 5.png, Portrait iOS 4.png, Portrait iOS 5.png, TestOrientation.zip
>
>
> I am using Sencha Touch 1.1 inside Phonegap 1.4.1 and the recent iOS orientation change fix works for me when using the iPhone 5.0 simulator but DOES NOT work as expected for me in older simulators like 4.2 or 4.3.
> Debugging Info:
> I am noticing that when using the older simulators, ie 4.2, 4.3 the inner web view does not seem to resize to the full width. I attached an on window resize event inside my app and for both portrait and landscape orientations, the width is 320 instead of being 320 for portrait and 480 for landscape. The height does change though. I am seeing 300 for landscape and 460 for portrait.
> I upgraded from phonegap 1.0 today and this was working as expected in 1.0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-221) iOS Orientation Change Doesn't Resize
WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201883#comment-13201883 ]
Shazron Abdullah commented on CB-221:
-------------------------------------
Note: I will verify tomorrow when I can bring in an older device - and will only verify for devices, not simulators (I don't have access to a 4.x simulator anymore sadly - I'm on Lion).
Another note: to quickly and effectively get a bug fixed, it would be appreciated if there is a test case w/ sample code that I could run. If not, usually it takes longer, etc because I have to create something to verify against for issue resolution.
Also, is your comment to the bug, another bug? If so, it should be filed as such.
> iOS Orientation Change Doesn't Resize WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
> ------------------------------------------------------------------------------------------------
>
> Key: CB-221
> URL: https://issues.apache.org/jira/browse/CB-221
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.4.0
> Environment: Mac OS X Version 10.6.8. xCode 4.2. Sencha Touch 1.1
> Reporter: Adam Arsenault
> Assignee: Shazron Abdullah
> Labels: iOS4, patch
>
> I am using Sencha Touch 1.1 inside Phonegap 1.4.1 and the recent iOS orientation change fix works for me when using the iPhone 5.0 simulator but DOES NOT work as expected for me in older simulators like 4.2 or 4.3.
> Debugging Info:
> I am noticing that when using the older simulators, ie 4.2, 4.3 the inner web view does not seem to resize to the full width. I attached an on window resize event inside my app and for both portrait and landscape orientations, the width is 320 instead of being 320 for portrait and 480 for landscape. The height does change though. I am seeing 300 for landscape and 460 for portrait.
> I upgraded from phonegap 1.0 today and this was working as expected in 1.0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-221) On an orientation change, the
orientationchange event not fired on iOS 3 and 4 (it is however fired on
iOS 5)
Posted by "Shazron Abdullah (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah updated CB-221:
--------------------------------
Priority: Blocker (was: Major)
Fix Version/s: 1.5.0
Summary: On an orientation change, the orientationchange event not fired on iOS 3 and 4 (it is however fired on iOS 5) (was: iOS Orientation Change Doesn't Resize WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3)
> On an orientation change, the orientationchange event not fired on iOS 3 and 4 (it is however fired on iOS 5)
> -------------------------------------------------------------------------------------------------------------
>
> Key: CB-221
> URL: https://issues.apache.org/jira/browse/CB-221
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.4.0
> Environment: Mac OS X Version 10.6.8. xCode 4.2. Sencha Touch 1.1
> Reporter: Adam Arsenault
> Assignee: Shazron Abdullah
> Priority: Blocker
> Labels: iOS4, patch
> Fix For: 1.5.0
>
> Attachments: Landscape iOS 4.png, Landscape iOS 5.png, Portrait iOS 4.png, Portrait iOS 5.png, TestOrientation.zip
>
>
> I am using Sencha Touch 1.1 inside Phonegap 1.4.1 and the recent iOS orientation change fix works for me when using the iPhone 5.0 simulator but DOES NOT work as expected for me in older simulators like 4.2 or 4.3.
> Debugging Info:
> I am noticing that when using the older simulators, ie 4.2, 4.3 the inner web view does not seem to resize to the full width. I attached an on window resize event inside my app and for both portrait and landscape orientations, the width is 320 instead of being 320 for portrait and 480 for landscape. The height does change though. I am seeing 300 for landscape and 460 for portrait.
> I upgraded from phonegap 1.0 today and this was working as expected in 1.0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-221) iOS Orientation Change Doesn't Resize
WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
Posted by "Adam Arsenault (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201886#comment-13201886 ]
Adam Arsenault commented on CB-221:
-----------------------------------
No it is not another bug. I think one causes the other
> iOS Orientation Change Doesn't Resize WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
> ------------------------------------------------------------------------------------------------
>
> Key: CB-221
> URL: https://issues.apache.org/jira/browse/CB-221
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.4.0
> Environment: Mac OS X Version 10.6.8. xCode 4.2. Sencha Touch 1.1
> Reporter: Adam Arsenault
> Assignee: Shazron Abdullah
> Labels: iOS4, patch
>
> I am using Sencha Touch 1.1 inside Phonegap 1.4.1 and the recent iOS orientation change fix works for me when using the iPhone 5.0 simulator but DOES NOT work as expected for me in older simulators like 4.2 or 4.3.
> Debugging Info:
> I am noticing that when using the older simulators, ie 4.2, 4.3 the inner web view does not seem to resize to the full width. I attached an on window resize event inside my app and for both portrait and landscape orientations, the width is 320 instead of being 320 for portrait and 480 for landscape. The height does change though. I am seeing 300 for landscape and 460 for portrait.
> I upgraded from phonegap 1.0 today and this was working as expected in 1.0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-221) iOS Orientation Change Doesn't Resize
WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
Posted by "Adam Arsenault (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200811#comment-13200811 ]
Adam Arsenault commented on CB-221:
-----------------------------------
On further analysis, it is looking like the orientationchange event never gets fired for 4.2 and 4.3 but does in 5.0
> iOS Orientation Change Doesn't Resize WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
> ------------------------------------------------------------------------------------------------
>
> Key: CB-221
> URL: https://issues.apache.org/jira/browse/CB-221
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.4.0
> Environment: Mac OS X Version 10.6.8. xCode 4.2. Sencha Touch 1.1
> Reporter: Adam Arsenault
> Assignee: Shazron Abdullah
> Labels: patch
>
> I am using Sencha Touch 1.1 inside Phonegap 1.4.1 and the recent iOS orientation change fix works for me when using the iPhone 5.0 simulator but DOES NOT work as expected for me in older simulators like 4.2 or 4.3.
> Debugging Info:
> I am noticing that when using the older simulators, ie 4.2, 4.3 the inner web view does not seem to resize to the full width. I attached an on window resize event inside my app and for both portrait and landscape orientations, the width is 320 instead of being 320 for portrait and 480 for landscape. The height does change though. I am seeing 300 for landscape and 460 for portrait.
> I upgraded from phonegap 1.0 today and this was working as expected in 1.0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-221) iOS Orientation Change Doesn't Resize
WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
Posted by "Shazron Abdullah (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah updated CB-221:
--------------------------------
Labels: iOS4 patch (was: patch)
> iOS Orientation Change Doesn't Resize WebView Width to Fully Fit Screen - iOS Simulator 4.2, 4.3
> ------------------------------------------------------------------------------------------------
>
> Key: CB-221
> URL: https://issues.apache.org/jira/browse/CB-221
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.4.0
> Environment: Mac OS X Version 10.6.8. xCode 4.2. Sencha Touch 1.1
> Reporter: Adam Arsenault
> Assignee: Shazron Abdullah
> Labels: iOS4, patch
>
> I am using Sencha Touch 1.1 inside Phonegap 1.4.1 and the recent iOS orientation change fix works for me when using the iPhone 5.0 simulator but DOES NOT work as expected for me in older simulators like 4.2 or 4.3.
> Debugging Info:
> I am noticing that when using the older simulators, ie 4.2, 4.3 the inner web view does not seem to resize to the full width. I attached an on window resize event inside my app and for both portrait and landscape orientations, the width is 320 instead of being 320 for portrait and 480 for landscape. The height does change though. I am seeing 300 for landscape and 460 for portrait.
> I upgraded from phonegap 1.0 today and this was working as expected in 1.0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-221) On an orientation change, the
orientationchange event not fired on iOS 3 and 4 (it is however fired on
iOS 5)
Posted by "Shazron Abdullah (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah updated CB-221:
--------------------------------
Attachment: TestOrientation.zip
> On an orientation change, the orientationchange event not fired on iOS 3 and 4 (it is however fired on iOS 5)
> -------------------------------------------------------------------------------------------------------------
>
> Key: CB-221
> URL: https://issues.apache.org/jira/browse/CB-221
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.4.0
> Environment: Mac OS X Version 10.6.8. xCode 4.2. Sencha Touch 1.1
> Reporter: Adam Arsenault
> Assignee: Shazron Abdullah
> Priority: Blocker
> Labels: iOS4, patch
> Fix For: 1.5.0
>
> Attachments: Landscape iOS 4.png, Landscape iOS 5.png, Portrait iOS 4.png, Portrait iOS 5.png, TestOrientation.zip
>
>
> I am using Sencha Touch 1.1 inside Phonegap 1.4.1 and the recent iOS orientation change fix works for me when using the iPhone 5.0 simulator but DOES NOT work as expected for me in older simulators like 4.2 or 4.3.
> Debugging Info:
> I am noticing that when using the older simulators, ie 4.2, 4.3 the inner web view does not seem to resize to the full width. I attached an on window resize event inside my app and for both portrait and landscape orientations, the width is 320 instead of being 320 for portrait and 480 for landscape. The height does change though. I am seeing 300 for landscape and 460 for portrait.
> I upgraded from phonegap 1.0 today and this was working as expected in 1.0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-221) On an orientation change, the
orientationchange event not fired on iOS 3 and 4 (it is however fired on
iOS 5)
Posted by "Shazron Abdullah (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah updated CB-221:
--------------------------------
Attachment: Portrait iOS 5.png
Portrait iOS 4.png
Landscape iOS 5.png
Landscape iOS 4.png
> On an orientation change, the orientationchange event not fired on iOS 3 and 4 (it is however fired on iOS 5)
> -------------------------------------------------------------------------------------------------------------
>
> Key: CB-221
> URL: https://issues.apache.org/jira/browse/CB-221
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Affects Versions: 1.4.0
> Environment: Mac OS X Version 10.6.8. xCode 4.2. Sencha Touch 1.1
> Reporter: Adam Arsenault
> Assignee: Shazron Abdullah
> Priority: Blocker
> Labels: iOS4, patch
> Fix For: 1.5.0
>
> Attachments: Landscape iOS 4.png, Landscape iOS 5.png, Portrait iOS 4.png, Portrait iOS 5.png, TestOrientation.zip
>
>
> I am using Sencha Touch 1.1 inside Phonegap 1.4.1 and the recent iOS orientation change fix works for me when using the iPhone 5.0 simulator but DOES NOT work as expected for me in older simulators like 4.2 or 4.3.
> Debugging Info:
> I am noticing that when using the older simulators, ie 4.2, 4.3 the inner web view does not seem to resize to the full width. I attached an on window resize event inside my app and for both portrait and landscape orientations, the width is 320 instead of being 320 for portrait and 480 for landscape. The height does change though. I am seeing 300 for landscape and 460 for portrait.
> I upgraded from phonegap 1.0 today and this was working as expected in 1.0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira