{ "id": "87933", "key": "TIMOB-7997", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13170", "name": "Sprint 2012-06", "archived": true, "released": true, "releaseDate": "2012-03-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-03-15T10:19:58.000+0000", "created": "2012-03-14T11:20:19.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-mw020912", "qe-port" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [], "assignee": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-08-08T16:26:04.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "Steps to reproduce:\r\n\r\n1. Create a default mobile web project\r\n2. Replace the code of app.js with the code below\r\n{code}\r\n\r\nvar win = Titanium.UI.createWindow({\r\n\t\t\ttitle : \"test\",\r\n\t\t\tbackgroundColor : 'white'\r\n\t\t});\r\nwin.open();\r\n\r\nvar xmlString = '';\r\n\t\tvar doc = Ti.XML.parseString(xmlString);\r\n\t\tvar elem = doc.documentElement.firstChild;\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tvar clone = elem.cloneNode(false);\r\n\t\t\t\r\n\t\t\tvar elemAttributes = elem.getAttributes();\r\n\t\t\tvar cloneAttributes = clone.getAttributes();\r\n\t\t\r\n\t\t\tif(elemAttributes.length != cloneAttributes.length)\r\n\t\t\t{\r\n\t\t\t\tthrow 'clone length not equal';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\talert('clone length equal');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(var i = 0; i < elemAttributes.length; i++)\r\n\t\t\t{\r\n\t\t\t\tvar elemNodeValue = elemAttributes.item(i).getNodeValue();\r\n\t\t\t\tvar cloneNodeValue = cloneAttributes.item(i).getNodeValue();\r\n\t\t\t\t\r\n\t\t\t\tif(elemNodeValue != cloneNodeValue)\r\n\t\t\t\t\tthrow 'clone node value not equal';\r\n\t\t\t\t\t\r\n\t\t\t\talert(elemNodeValue + '=' + cloneNodeValue);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\talert('clone node values equal');\r\n\t\t\t\r\n\t\t\talert('Test Complete.');\r\n\t\t}\r\n\t\tcatch(e)\r\n\t\t{\r\n\t\t\talert(e.toString());\r\n\t\t}\r\n{code}\r\n\r\nActual Result:\r\nAn error alert is shown with the following error \"TypeError: Result of expression 'elem.getAttributes'[undefined] is not a function.\"\r\n\r\nExpected Result:\r\nNo error alert is shown\r\n*Expected behavior is shown on iOS and Android*", "attachment": [], "flagged": false, "summary": "MobileWeb : XML - The Titanium.XML.Document method getAttributes gives the message \"TypeError: Result of expression elem.getAttributes [undefined] is not a function\"", "creator": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Tested with Ti Studio build 1.0.9.201202141208\r\nTi Mob SDK 2.0.0.v20120314090311\r\nOSX Lion 10.7.3\r\niPad 1 OS 4.3.5, Galaxy Tab 10.1 OS 3.0", "comment": { "comments": [ { "id": "186508", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull Request: https://github.com/appcelerator/titanium_mobile/pull/1677", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-14T14:44:27.000+0000", "updated": "2012-03-14T14:44:27.000+0000" }, { "id": "213424", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Tested On:\r\nTitanium studio : 2.1.1.201207271312\r\nSDK version : 2.2.0.v20120807144112\r\nAndroid 4.0.4 - default ,chrome 18.0\r\nIphone 4.3.5 - safari mobile\r\nMountain lion(10.8) - chrome 21.0,safari 5.1.4,firefox 14.0.1", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-08T15:21:31.000+0000", "updated": "2012-08-08T15:21:31.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }