{ "id": "124448", "key": "AC-1945", "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": "2014-01-12T04:48:55.000+0000", "created": "2014-01-07T05:33:28.000+0000", "labels": [ "iphone", "keyboardtoolbar" ], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:52.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": "am using titanium studio code .I have some issues from keyboard toolbar.If i have multiple text fields tab to next or click to next mean first time properly showed the previous and next button.But when am refocusing or click the reverse the field it does not show the previous and next button.So please any one advice me.\r\n\r\n\r\nThanks,\r\nHari ", "attachment": [], "flagged": false, "summary": "KeyboardToolbar issues", "creator": { "name": "hariharan", "key": "hariharan", "displayName": "Hariharan Ganesan", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "hariharan", "key": "hariharan", "displayName": "Hariharan Ganesan", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "286893", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please provide a simple test case to reproduce this issue and we would be happy to investigate this issue.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-07T06:14:37.000+0000", "updated": "2014-01-07T06:14:37.000+0000" }, { "id": "286901", "author": { "name": "hariharan", "key": "hariharan", "displayName": "Hariharan Ganesan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "var sign_up_windows = function() {\r\n\t//------------------------Basic Includes------------------------ //\r\n\tTi.include('ui/basic_views.js');\r\n\tTi.include('ui/advanced_views.js');\r\n\tTi.include('common/api.js');\r\n\tvar activity_indicators = require('ui/ui');\r\n\tvar activity_indicator = '';\r\n\t//------------------------Basic Includes------------------------ //\r\n\t//------------------------Window Element------------------------ //\r\n\tvar sign_up_window = new_window('window');\r\n\tvar scrollView1 = Ti.UI.createScrollView({ \r\n\t contentWidth:'auto', \r\n\t contentHeight:'auto', \r\n\t top:0, \r\n\t showVerticalScrollIndicator:true, \r\n\t showHorizontalScrollIndicator:true \r\n\t});\r\n\tvar slidein = Titanium.UI.createAnimation({\r\n\t\tbottom : -43\r\n\t});\r\n\tvar slideout = Titanium.UI.createAnimation({\r\n\t\tbottom : -250\r\n\t});\r\n\t//------------------------Window Element------------------------ //\r\n\t//------------------------Header Section------------------------ //\r\n\tvar sign_up_image_view = new_view('sign_up_image_view');\r\n\tvar sign_up_image = new_image('sign_up_image', 'images/logo.png');\r\n\tsign_up_image_view.add(sign_up_image);\r\n\tscrollView1.add(sign_up_image_view);\r\n\t//------------------------Header Section------------------------ //\r\n\tvar sign_up_view = v_view(\"sign_up_view\");\r\n\tscrollView1.add(sign_up_view);\r\n\r\n\tvar sign_up_now = new_label('sign_up_now', 'Quick Sign Up');\r\n\tsign_up_view.add(sign_up_now);\r\n\r\n\tvar first_name_view = new_view(\"first_name_view\");\r\n\tvar last_name_view = new_view(\"last_name_view\");\r\n\tvar age_view = new_view(\"age_view\");\r\n\tvar sex_view = new_view(\"sex_view\");\r\n\tvar email_view = new_view(\"email_view\");\r\n\tvar password_view = new_view(\"password_view\");\r\n\tvar signup_button = new_button('signup_button', 'images/greenbtn.png', 'images/greenbtn_select.png');\r\n\tsignup_button.selectedColor = \"#fff\";\r\n\tsignup_button.title = \"Sign Up\";\r\n\r\n\tvar first_name_field = new_text('first_name_field', 'First Name');\r\n\tvar last_name_field = new_text('last_name_field', 'Last Name');\r\n\tvar age_field = l_label('age_field_label', 'D.O.B');\r\n\tvar sex_field = l_label('sex_field_label', 'Sex');\r\n\tvar email_field = new_email('email_field', 'Email');\r\n\tvar password_field = new_password('password_field', 'Password');\r\n\r\n\tfirst_name_field.returnKeyType = Titanium.UI.RETURNKEY_NEXT;\r\n\tlast_name_field.returnKeyType = Titanium.UI.RETURNKEY_NEXT;\r\n\temail_field.returnKeyType = Titanium.UI.RETURNKEY_NEXT;\r\n\tpassword_field.returnKeyType = Titanium.UI.RETURNKEY_DONE;\r\n\r\n\tfirst_name_view.add(first_name_field);\r\n\tlast_name_view.add(last_name_field);\r\n\tage_view.add(age_field);\r\n\tsex_view.add(sex_field);\r\n\temail_view.add(email_field);\r\n\tpassword_view.add(password_field);\r\n\r\n\tsign_up_view.add(first_name_view);\r\n\tsign_up_view.add(last_name_view);\r\n\tsign_up_view.add(age_view);\r\n\tsign_up_view.add(sex_view);\r\n\tsign_up_view.add(email_view);\r\n\tsign_up_view.add(password_view);\r\n\tsign_up_view.add(signup_button);\r\n\tsignup_button.addEventListener('click', function() {\r\n\t\tsign_me_up();\r\n\t});\r\n\t//------------------------Sign In Section------------------------ //\r\n\tvar already_registered = new_view('already_registered');\r\n\tvar already_registered_label = new_label(\"already_registered_label\", \"Already have an account?\");\r\n\tvar log_in_button = new_button('log_in_button', 'images/redactionbtn.png', 'images/redactionbtn_select.png');\r\n\tlog_in_button.selectedColor = \"#fff\";\r\n\tlog_in_button.title = \"Log In\";\r\n\tscrollView1.add(already_registered);\r\n\talready_registered.add(already_registered_label);\r\n\talready_registered.add(log_in_button);\r\n\r\n\tlog_in_button.addEventListener('click', function() {\r\n\t\tsign_up_window.close({\r\n\t\t\ttransition : Ti.UI.iPhone.AnimationStyle.CURL_DOWN\r\n\t\t});\r\n\t});\r\n\t//------------------------Sign In Section------------------------ //\r\n\r\n\tvar cancel = Titanium.UI.createButton({\r\n\t\ttitle : 'Cancel',\r\n\t\tstyle : Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n\t});\r\n\tvar spacer = Titanium.UI.createButton({\r\n\t\tsystemButton : Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE\r\n\t});\r\n\tvar done = Titanium.UI.createButton({\r\n\t\ttitle : 'Done',\r\n\t\tstyle : Titanium.UI.iPhone.SystemButtonStyle.DONE\r\n\t});\r\n\tvar next = Titanium.UI.createButton({\r\n\t\ttitle : 'Next',\r\n\t\tstyle : Titanium.UI.iPhone.SystemButtonStyle.DONE\r\n\t});\r\n\tvar spacer = Titanium.UI.createButton({\r\n\t\tsystemButton : Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE\r\n\t});\r\n\tvar toolbar = Titanium.UI.createToolbar({\r\n\t\ttop : 0,\r\n\t\titems : [cancel, spacer]\r\n\t});\r\n\t//\r\n\tfirst_name_field.keyboardToolbar = [cancel, spacer, next];\r\n\tlast_name_field.keyboardToolbar = [cancel, spacer, next];\r\n\tsex_field.keyboardToolbar = [cancel, spacer, next];\r\n\temail_field.keyboardToolbar = [cancel, spacer, next];\r\n\tpassword_field.keyboardToolbar = [cancel, spacer, done];\r\n\r\n\tvar pickerView = Titanium.UI.createView({\r\n\t\theight : 250,\r\n\t\tbottom : -250,\r\n\t\tvisibleItems : 3\r\n\t});\r\n\tscrollView1.add(pickerView);\r\n\r\n\tvar active_picker = \"\";\r\n\r\n\tvar minDate = new Date();\r\n\tminDate.setFullYear(1900);\r\n\tminDate.setMonth(0);\r\n\tminDate.setDate(1);\r\n\r\n\tvar maxDate = new Date();\r\n\tmaxDate.setFullYear(1999);\r\n\tmaxDate.setMonth(11);\r\n\tmaxDate.setDate(31);\r\n\r\n\tvar value = new Date();\r\n\tmaxDate.setFullYear(1999);\r\n\r\n\tvar age_picker = Ti.UI.createPicker({\r\n\t\ttype : Ti.UI.PICKER_TYPE_DATE,\r\n\t\ttop : 43,\r\n\t\tminDate : minDate,\r\n\t\tmaxDate : maxDate,\r\n\t\tvalue : value\r\n\t});\r\n\r\n\tvar sex_picker = Titanium.UI.createPicker({\r\n\t\ttop : 43\r\n\t});\r\n\tsex_picker.selectionIndicator = true;\r\n\tvar sex_values = [Titanium.UI.createPickerRow({\r\n\t\ttitle : 'Male',\r\n\t\tid : 1\r\n\t}), Titanium.UI.createPickerRow({\r\n\t\ttitle : 'Female',\r\n\t\tid : 2\r\n\t})];\r\n\tsex_picker.add(sex_values);\r\n\t//pickerView.add(toolbar);\r\n\r\n\tsex_picker.addEventListener('change', function(e) {\r\n\t\t//alert('sex change');\r\n\t\tsex_field.text = sex_picker.getSelectedRow(0).title;\r\n\t\tsex_field.color = \"#000000\";\r\n\t\temail_field.focus();\r\n\t\ttoolbar.items = [cancel, spacer, next];\r\n\t\t\r\n\t});\r\n\t\r\n\tvar dob_date = \"\";\r\n\tage_picker.addEventListener('change', function(e) {\r\n\t\t//alert('age change');\r\n\t\tdob_date = e.value;\r\n\t\ttoday_date = dob_date.getDate();\r\n\t\ttoday_month = dob_date.getMonth() + 1;\r\n\t\ttoday_year = dob_date.getFullYear();\r\n\t\tage_field.text = today_date + \"/\" + today_month + \"/\" + today_year;\r\n\t\tage_field.color = \"#000000\";\r\n\t\ttoolbar.items = [cancel, spacer, next];\r\n\t});\r\n\t\r\n\t\r\n\t//pickerView.add(sex_picker);\r\n\r\n\tsex_view.addEventListener('click', function() {\r\n\t\t//alert('sex click');\r\n\t\t//animate_up();\r\n\t\tpickerView.animate(slidein);\r\n\t\tfirst_name_field.blur();\r\n\t\tlast_name_field.blur();\r\n\t\temail_field.blur();\r\n\t\tpassword_field.blur();\r\n\t\tactive_field = sex_field;\r\n\t\ttoolbar.items = [cancel, spacer, next];\r\n\t\tif (active_picker != sex_picker) {\r\n\t\t\tpickerView.remove(age_picker);\r\n\t\t\tactive_picker == age_picker;\r\n\t\t\tpickerView.add(sex_picker);\r\n\t\t}\r\n\t});\r\n\r\n\tage_view.addEventListener('click', function(e) {\r\n\t\t//alert('age click');\r\n\t\tactive_field = age_field;\r\n\t\t//animate_up();\r\n\t\tpickerView.animate(slidein);\r\n\t\tfirst_name_field.blur();\r\n\t\tlast_name_field.blur();\r\n\t\temail_field.blur();\r\n\t\tpassword_field.blur();\r\n\t\ttoolbar.items = [cancel, spacer, next];\r\n\t\tif (active_picker != age_picker) {\r\n\t\t\tpickerView.remove(sex_picker);\r\n\t\t\tactive_picker == age_picker;\r\n\t\t\tpickerView.add(age_picker);\r\n\t\t}\r\n\t});\r\n\r\n\t// //------------------------Sign In Section------------------------ //\r\n\tvar active_field = \"\";\r\n\r\n\tfirst_name_field.addEventListener('focus', function(e) {\r\n\t\tactive_field = first_name_field;\r\n\t\t//animate_up();\r\n\t\t//alert(\"hi\");\r\n\t\tfirst_name_field.keyboardToolbar = [cancel, spacer, next];\r\n\t\t//pickerView.animate(slideout);\r\n\t});\r\n\tfirst_name_field.addEventListener('return', function(e) {\r\n\t\tlast_name_field.focus();\r\n\t});\r\n\tlast_name_field.addEventListener('focus', function(e) {\r\n\t\tactive_field = last_name_field;\r\n\t\t//pickerView.animate(slideout);\r\n\t\t//animate_up();\r\n\t\tlast_name_field.keyboardToolbar = [cancel, spacer, next];\r\n\t});\r\n\tlast_name_field.addEventListener('return', function(e) {\r\n\t\t//alert(\"keyboard showing\");\r\n\t\t//age_field.focus();\r\n\t\tage_view.fireEvent('click');\r\n\t\t\r\n\t});\r\n\t\r\n\temail_field.addEventListener('focus', function(e) {\r\n\t\t//alert('email field');\r\n\t\t//animate_up();\r\n\t\t\r\n\t\tpickerView.remove(sex_picker);\r\n\t\t//email_field.focus();\r\n\t\tactive_field = email_field;\r\n\t\t\r\n\t\temail_field.keyboardToolbar = [cancel, spacer, next];\r\n\t});\r\n\temail_field.addEventListener('return', function(e) {\r\n\t\tpassword_field.focus();\r\n\t});\r\n\tpassword_field.addEventListener('focus', function(e) {\r\n\t\t//animate_up();\r\n\t\t//pickerView.animate(slideout);\r\n\t\tactive_field = password_field;\r\n\t\tpassword_field.keyboardToolbar = [cancel, spacer, done];\r\n\t});\r\n\tpassword_field.addEventListener('return', function() {\r\n\t\tsign_me_up();\r\n\t});\r\n\r\n\tfunction alert_me(title, message) {\r\n\t\tvar alertalert = Ti.UI.createAlertDialog();\r\n\t\talertalert.title = title;\r\n\t\talertalert.message = message;\r\n\t\talertalert.show();\r\n\t}\r\n\r\n\tfunction sign_me_up() {\r\n\t\tif (first_name_field.value == '' || first_name_field.value == null || first_name_field.value == 'undefined') {\r\n\t\t\tfirst_name_field.focus();\r\n\t\t\talert_me('Error', 'Input First Name !');\r\n\t\t} else if (last_name_field.value == '' || last_name_field.value == null || last_name_field.value == 'undefined') {\r\n\t\t\tlast_name_field.focus();\r\n\t\t\talert_me('Error', 'Input Last Name !');\r\n\t\t} else if (age_field.text == 'D.O.B') {\r\n\t\t\tage_field.fireEvent('click');\r\n\t\t\talert_me('Error', 'Confirm your Age !');\r\n\t\t} else if (sex_field.text == 'Sex') {\r\n\t\t\tsex_field.fireEvent('click');\r\n\t\t\talert_me('Error', 'Confirm your Gender !');\r\n\t\t} else if (email_field.value == '' || email_field.value == null || email_field.value == 'undefined') {\r\n\t\t\temail_field.focus();\r\n\t\t\talert_me('Error', 'Input Email !');\r\n\t\t} else if (password_field.value == '' || password_field.value == null || password_field.value == 'undefined') {\r\n\t\t\tpassword_field.focus();\r\n\t\t\talert_me('Error', 'Input Password !');\r\n\t\t} else {\r\n\t\t\t//animate_down();\r\n\t\t\tactivity_indicator = new activity_indicators('Logging In...');\r\n\t\t\tactivity_indicator.open();\r\n\t\t\tvar return_repsonse;\r\n\t\t\tvar xhr = Ti.Network.createHTTPClient({\r\n\t\t\t\tonload : function() {\r\n\t\t\t\t\tmyjson = JSON.parse(this.responseText);\r\n\t\t\t\t\tcheck_my_signup(myjson);\r\n\t\t\t\t},\r\n\t\t\t\tonerror : function(e) {\r\n\t\t\t\t\tTi.API.debug(\"STATUS: \" + this.status);\r\n\t\t\t\t\tTi.API.debug(\"TEXT: \" + this.responseText);\r\n\t\t\t\t\tTi.API.debug(\"ERROR: \" + e.error);\r\n\t\t\t\t\tactivity_indicator.close({\r\n\t\t\t\t\t\topacity : 0,\r\n\t\t\t\t\t\tduration : 1000\r\n\t\t\t\t\t}, function() {\r\n\t\t\t\t\t\tif (Titanium.Network.online) {\r\n\t\t\t\t\t\t\talert('No reponse from server.');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\talert('Please Check your Internet connectivity.');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t\ttimeout : 5000\r\n\t\t\t});\r\n\t\t\tvar params = \"api_token=\" + api_token_code;\r\n\t\t\tparams = params + \"&user[first_name]=\" + first_name_field.value;\r\n\t\t\tparams = params + \"&user[last_name]=\" + last_name_field.value;\r\n\t\t\tparams = params + \"&user[gender]=\" + sex_field.text;\r\n\t\t\tparams = params + \"&user[date_of_birth]=\" + age_field.text;\r\n\t\t\tparams = params + \"&user[email]=\" + email_field.value;\r\n\t\t\tparams = params + \"&user[password]=\" + password_field.value;\r\n\t\t\tparams = params + \"&user[password_confirmation]=\" + password_field.value;\r\n\t\t\tparams = params + \"&user[terms]=1\";\r\n\t\t\t\r\n\t\t\txhr.open('POST', main_url + 'users.json', true);\r\n\t\t\txhr.send(params);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction check_my_signup(myjson) {\r\n\t\tactivity_indicator.close({\r\n\t\t\topacity : 0,\r\n\t\t\tduration : 1000\r\n\t\t}, function() {\r\n\t\t\tif (myjson[0].id >= 1) {\r\n\t\t\t\talert(myjson[0].id);\r\n\t\t\t\tlogged_user_id = myjson[0].id;\r\n\t\t\t\tvar main_windows = require('nav/main_window');\r\n\t\t\t\tvar main_window = new main_windows(myjson);\r\n\t\t\t\tmain_window.open({\r\n\t\t\t\t\tanimated : true,\r\n\t\t\t\t});\r\n\t\t\t} else if (myjson[0].code == 0) {\r\n\t\t\t\talertalert.title = \"Sign Up Error\";\r\n\t\t\t\talertalert.message = \"Invalid Params !\";\r\n\t\t\t\talertalert.buttonNames = ['Retry'];\r\n\t\t\t\talertalert.show();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\r\n\tcancel.addEventListener('click', function() {\r\n\t\tanimate_down();\r\n\t\tpickerView.animate(slideout);\r\n\t});\r\n\r\n\tnext.addEventListener('click', function() {\r\n\t\t \r\n\t\tfirst_name_view.add(first_name_field);\r\n\t\tlast_name_view.add(last_name_field);\r\n\t\tage_view.add(age_field);\r\n\t\tsex_view.add(sex_field);\r\n\t\temail_view.add(email_field);\r\n\t\tpassword_view.add(password_field);\r\n\r\n\t\tif (active_field == first_name_field) {\r\n\t\t\tlast_name_field.focus();\r\n\t\t} else if (active_field == last_name_field) {\r\n\t\t\tage_field.fireEvent('click');\r\n\t\t} else if (active_field == age_field) {\r\n\t\t\tsex_field.fireEvent('click');\r\n\t\t} else if (active_field == sex_field) {\r\n\t\t\temail_field.focus();\r\n\t\t} else if (active_field == email_field) {\r\n\t\t\tpassword_field.focus();\r\n\t\t} else if (active_field == password_field) {\r\n\t\t\t;\r\n\t\t} else {\r\n\t\t\t;\r\n\t\t}\r\n\t});\r\n\tdone.addEventListener('click', function() {\r\n\t\t//animate_down();\r\n\t});\r\n\tfunction animate_up() {\r\n\t\tsign_up_window.animate({\r\n\t\t\ttop : -170,\r\n\t\t\tcurve : Ti.UI.ANIMATION_CURVE_EASE_IN_OUT,\r\n\t\t\tduration : 500\r\n\t\t});\r\n\t}\r\n\r\n\tfunction animate_down() {\r\n\t\tsign_up_window.animate({\r\n\t\t\ttop : 0,\r\n\t\t\tcurve : Ti.UI.ANIMATION_CURVE_EASE_IN_OUT,\r\n\t\t\tduration : 500\r\n\t\t});\r\n\t\tfirst_name_field.blur();\r\n\t\tlast_name_field.blur();\r\n\t\temail_field.blur();\r\n\t\tpassword_field.blur();\r\n\t\tpickerView.animate(slideout);\r\n\t}\r\n\tsign_up_window.add(scrollView1);\r\n\treturn sign_up_window;\r\n};\r\n\r\nmodule.exports = sign_up_windows;\r\n//--------------------------------------------------------//\r\n/********************************************\r\n ************@author Sahil Grover************\r\n ********************************************/\r\n//--------------------------------------------------------//\r\nhere am i attached my code", "updateAuthor": { "name": "hariharan", "key": "hariharan", "displayName": "Hariharan Ganesan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-07T06:38:44.000+0000", "updated": "2014-01-07T06:39:20.000+0000" }, { "id": "287162", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I would appreciate if you can trim down the code here and provide a simpler test case. It is hard to understand the provided code.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-08T06:05:29.000+0000", "updated": "2014-01-08T06:05:29.000+0000" }, { "id": "287860", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving this ticket as we have not been able to reproduce this issue with our own test case and the provided test case is too complex to build and debug. We would be happy to reopen this ticket and investigate this issue further if you can provide a simple test case.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-12T04:48:55.000+0000", "updated": "2014-01-12T04:48:55.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }