{ "id": "112933", "key": "AC-1881", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-04-18T17:37:35.000+0000", "created": "2013-04-16T13:16:46.000+0000", "labels": [ "ios", "layout", "modal", "navigationgroup" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:40:48.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "*Steps to reproduce*\r\nIf you run the test case you can see too things:\r\n- open close multiple times the modal window. You get wrong layout 1 / 2\r\n- NavigationGroup: wrong layout adjustment on opening\r\n\r\n*Test case*\r\n{code}\r\n// by default the modal window has a nav bar\r\n// since we're embedding a navgroup inside the modal\r\n// window which also has a nav bar, we ask him to hide it\r\nvar currentwin = Ti.UI.createWindow({\r\n\tbackgroundColor : \"white\"\r\n});\r\n\r\nvar open = Ti.UI.createButton({\r\n\ttitle : 'Open nav group',\r\n\ttop : 150,\r\n\twidth : 200,\r\n\theight : 40\r\n});\r\nopen.addEventListener('click', function() {\r\n\tmodal.open({\r\n\t\tmodal : true\r\n\t});\r\n});\r\ncurrentwin.add(open);\r\n\r\nvar modal = Ti.UI.createWindow({\r\n\tbackgroundColor : 'black',\r\n\tnavBarHidden : true\r\n});\r\n\r\nvar modalWin = Ti.UI.createWindow({\r\n\tbackgroundColor : \"red\"\r\n});\r\n\r\nvar nav = Ti.UI.iPhone.createNavigationGroup({\r\n\ttop : 0,\r\n\tbottom : 0,\r\n\twindow : modalWin,\r\n\tbackgroundColor : 'blue'\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n\ttop : 10,\r\n\tstyle : Ti.UI.iPhone.TableViewStyle.GROUPED,\r\n\tdata : [{\r\n\t\ttitle : \"Well look at this\"\r\n\t}, {\r\n\t\ttitle : \"TweetDeck is cool\"\r\n\t}]\r\n});\r\nmodalWin.add(table);\r\nmodalWin.add(Ti.UI.createView({\r\n\tbottom : 5,\r\n\twidth : 100,\r\n\theight : 100,\r\n\tbackgroundColor : 'blue'\r\n\r\n}));\r\n\r\nvar done = Titanium.UI.createButton({\r\n\tsystemButton : Titanium.UI.iPhone.SystemButton.DONE\r\n});\r\n\r\nmodalWin.setRightNavButton(done);\r\n\r\ndone.addEventListener('click', function() {\r\n\tmodal.close();\r\n});\r\n\r\ntable.addEventListener('click', function(e) {\r\n\tvar b = Titanium.UI.createButton({\r\n\t\ttitle : 'Back (no anim)',\r\n\t\tstyle : Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n\t});\r\n\tb.addEventListener('click', function() {\r\n\t\tnav.close(w, {\r\n\t\t\tanimated : false\r\n\t\t});\r\n\t});\r\n\tvar w = Ti.UI.createWindow({\r\n\t\ttitle : e.rowData.title,\r\n\t\trightNavButton : b\r\n\t});\r\n\tw.addEventListener('focus', function() {\r\n\t\tTi.API.info(\"nav group window -- focus event\");\r\n\t});\r\n\tw.addEventListener('blur', function() {\r\n\t\tTi.API.info(\"nav group window -- blur event\");\r\n\t});\r\n\tvar b = Ti.UI.createButton({\r\n\t\ttitle : \"Close Nav\",\r\n\t\twidth : 120,\r\n\t\theight : 40\r\n\t});\r\n\tb.addEventListener('click', function() {\r\n\t\tmodal.close();\r\n\t});\r\n\tw.add(b);\r\n\tnav.open(w);\r\n});\r\n\r\nmodal.add(nav);\r\n// modal.open({modal:true});\r\ncurrentwin.open();\r\n{code}", "attachment": [ { "id": "37595", "filename": "31ga-modalwindow.png", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-17T23:50:01.000+0000", "size": 16280, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Modal Window, wrong layout", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "Titanium 3.2.0 master\r\niOS SDK 5.0, 6.0, 6.1\r\niPhone Simulator, iPhone 5", "comment": { "comments": [ { "id": "247748", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "pull request \nhttps://github.com/appcelerator/titanium_mobile/pull/4170", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-04-16T13:24:40.000+0000", "updated": "2013-04-16T13:24:40.000+0000" }, { "id": "248071", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Martin,\r\n\r\nPlease can you clarify what you mean by \"wrong layout\"? The fact that the red background shows, meaning the height of the modal view is not correct?\r\n\r\nThanks.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-17T23:50:01.000+0000", "updated": "2013-04-17T23:50:01.000+0000" }, { "id": "248115", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "@Daniel: I am really confused, i cant reproduce it either on the master branch or even on 3.0.2.GA\nI was sure it was happening. This is really strange to me\nYou can close it for now and i ll try and dig deep into this.\n\nI am really really sorry to have wasted your time Daniel. ", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-04-18T07:38:48.000+0000", "updated": "2013-04-18T07:38:48.000+0000" }, { "id": "248179", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "No problem, I'll resolve as \"Cannot Reproduce\".", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-18T17:37:35.000+0000", "updated": "2013-04-18T17:37:35.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }