Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17719] iOS8: Alert dialog does not consider window orientation modes when keyboard is displayed

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-10-01T20:33:09.000+0000
Affected Version/sRelease 3.4.0
Fix Version/sRelease 3.4.2, Release 3.5.0, Release 4.0.0
ComponentsiOS
Labelsios8, module_alertdialog, qe-3.4.1, qe-manualtest, supportTeam
ReporterMarco Cota
AssigneeVishal Duggal
Created2014-09-17T21:08:46.000+0000
Updated2014-12-04T19:43:07.000+0000

Description

Issue

When the alert dialog is called with an input text style and a orientation mode restricted to Portrait and the device is rotated to landscape the alertDialog keeps rotating but only if the keyboard is being displayed, if the keyboard is hiding the alert will not rotate.

Step to reproduce

1. Run the test code 2. Tap on the "Welcome to Titanium" for the alert to be displayed 3. Try to rotate the device. 4. Go back to portrait and tap on the input text box. 5. Try to rotate the device

Expected Results

The alert will not rotate and remain in portrait mode.

Actual results

When the keyboard is hidden the alert will not rotate, once the keyboard is displayed the alert will begin to rotate

Test Code

var win = Ti.UI.createWindow({
	orientationModes: [Ti.UI.PORTRAIT],
	backgroundColor:'#ffffff'
});

	var label = Ti.UI.createLabel({
		color:'#000000',
		text:String.format(L('welcome'),'Titanium'),
		height:'auto',
		width:'auto'
	});

	label.addEventListener('click', function(e) {
	    var alertDialog = Ti.UI.createAlertDialog({
            title: "Alert Dialog",
            message: "akjskajksa skajskajksjas akjskajskjaks aksjakjsa aksjakjsa aksjakjsa aksjakjsa aksjakjsa aksjakjsa aksjakjsa",
            style: Ti.UI.iPhone.AlertDialogStyle.PLAIN_TEXT_INPUT
        });

        alertDialog.show();
	});

win.add(label);
win.open();

Attachments

FileDateSize
4sLandscape.PNG2014-09-18T18:17:14.000+000076709
4sPortrait.PNG2014-09-18T18:17:14.000+000080548
iPadRotated.PNG2014-09-18T18:17:14.000+0000190396

Comments

  1. Ewan Harris 2014-09-18

    Can reproduce on: Mac OSX 10.9.4 Appcelerator Studio, build:3.4.0.201409161950 Titanium SDK build: 3.4.0.v20140917120000 Titanium CLI, build: 3.4.0-rc4 Alloy: 1.5.0-rc2 Xcode6.0.1 iOS Device iPad4 (8.0), iPhone 4s (8.0) When a keyboard is on screen the alert dialog rotates on both devices but the keyboard stays in place, on a large device this is not an issue but on a smaller device the alert dialog is hidden because of this. See attached screenshots. *Please note*, this is using forced orientation.
  2. Vishal Duggal 2014-10-01

    Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/6188 3_4_X - https://github.com/appcelerator/titanium_mobile/pull/6189
  3. Olga Romero 2014-10-02

    Tested and verified the fix, using Mac osx 10.9.5 Mavericks Appcelerator Studio, build: 3.4.0.201409261245 Titanium SDK, build: 3.4.1.v20141001133315 acs@1.0.18 alloy 1.5.1-rc install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium 3.4.0 titanium-code-processor@1.1.1 Xcode6.1GM The alert dialog remains in a portrait mode.

JSON Source