Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18481] iOS: Alert dialog issue with persistent set to true

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-02-17T19:21:07.000+0000
Affected Version/sRelease 3.5.0
Fix Version/sRelease 4.0.0
ComponentsiOS
Labelsqe-4.0.0
ReporterMauro Parra-Miranda
AssigneeVishal Duggal
Created2015-01-30T15:11:51.000+0000
Updated2015-03-05T23:23:50.000+0000

Description

Problem Description

When you have a delay on an alert, with persistent set to true, you will experience a weird glitch when waiting for the alert and you pull down the phone notification window. The alert will appear behind the notification window, when you close the notification window, the alert will disappear. This doesn't happen with iOS 8.x

Steps to reproduce

1. Create a new mobile project Classic Titanium 2. Paste this code into app.js:
var win = Ti.UI.createWindow({backgroundColor:'white'});


var dateBaseView = Titanium.UI.createView({
	width : "80dip",
	height : "40dip",
	backgroundColor : 'green'
});
dateBaseView.addEventListener("click", showDatePicker);

win.add(dateBaseView);

function showDatePicker() {
	setTimeout(function() {
		var dialog = Titanium.UI.createAlertDialog({
			title : "Test Bug",
			message : "Testing",
			persistent : true,
			buttonNames : ["OK"]
		});
		dialog.show();
	}, 4000);
}
win.open();
3. Run it in iOS 7 (either device or sim). 4. Click on the green square 5. Drop down the phone notification window from the top of the screen. 6. wait until the alert appears behind the current window. 7. Close the Window 8. You will see the alert dissapear.

Extra info

This doesn't happen with iOS8. There is alternative ways to reproduce this, as well: 1. open app and tap on the green view. 2. wait for the alert to appear. 2. Double tap device home button immediately to go the recent running apps view. 3. tap the app from recent running apps list to make it foreground again. The issue appears. Looks like something to do with the way iOS 7 handles window stack.

Comments

  1. Vishal Duggal 2015-02-17

    Pull pending master- https://github.com/appcelerator/titanium_mobile/pull/6644
  2. Eric Wieber 2015-03-05

    Verified fixed, using: Titanium SDK 4.0.0.v20150303161012 Studio 4.0.0.201502171827 CLI 3.4.2-rc4 Xcode 6.2b5 Alert is not dismissed when closing notification center, as expected.

JSON Source