Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18139] iOS: Alert gets moved if on screen when application error thrown

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-12-08T20:21:26.000+0000
Affected Version/sRelease 3.5.0, Release 4.0.0
Fix Version/sRelease 3.5.0, Release 4.0.0
ComponentsiOS
Labelsqe-3.5.0, regression
ReporterEwan Harris
AssigneeVishal Duggal
Created2014-12-04T19:23:00.000+0000
Updated2014-12-09T23:10:39.000+0000

Description

Description

If an alert is on screen when the 'red screen' is thrown on device, when the screen is dismissed the alert appears in the upper left hand corner of the screen, as shown in the screenshot 3.5.0. *This is a regression* as when using 3.4.1 and running the same code the behaviour is different. The alert is displayed on top of the 'red screen' and always stays centred, as shown in the screenshot 3.4.1 *Notes* I am investigating to see if there are any other actions which cause this behaviour. The alert can still be dismissed from it's position as the bottom can still be tapped
Titanium.UI.setBackgroundColor('#fff');  
var win = Titanium.UI.createWindow({title: 'test'});  
alert('Will I move or not!!');  
win.foobar();
win.open();

Steps To Reproduce

1. Add the code above to an existing project build and run on an iOS device using 3.5.0 SDK

Actual Result

The alert will not be displayed on top of the 'red screen', when the 'red screen' is dismissed the alert is positioned at the top left of the screen.

Expected Result

The alert should be the top item in the window and should always be centred

Attachments

FileDateSize
3.4.1.PNG2014-12-04T19:28:50.000+0000138012
3.5.0.PNG2014-12-04T19:28:50.000+00001581394

Comments

  1. Vishal Duggal 2014-12-08

    The behavior on iOS7 will be different from the behavior on iOS8. On iOS8 the Alert is a proper View Controller that is part of the RootViewController hierarchy. On iOS7 it is not part of the RootViewController hierarchy but rather of the Application Window. We will fix the bug regarding the centering of the alert on dismissal of the ErrorController but we will not fix the behavior discrepancy
  2. Vishal Duggal 2014-12-08

    Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/6453 3_5_X - https://github.com/appcelerator/titanium_mobile/pull/6454
  3. Ewan Harris 2014-12-09

    Verified fix on: Mac OSX 10.10.1 Appcelerator Studio, build: 3.4.1.201410281743 Titanium SDK build: 3.5.0.v20141208122514, 3.6.0.v20141209113313 Titanium CLI, build: 3.4.1 Alloy: 1.5.1 Xcode 6.1.1 iPhone 6 Plus (8.1), iPhone 6 Simulator (8.1) Ran the code in the description. The alert is no longer shown on top of the error screen and when the error screen is dismissed the alert is still centered as expected. Closing ticket

JSON Source