Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26431] iOS: Password Keyboard Toolbar showing on non password fields

GitHub Issuen/a
TypeBug
PriorityNone
StatusResolved
ResolutionNot Our Bug
Resolution Date2018-11-19T04:05:18.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterRiduanul Islam
AssigneeVijay Singh
Created2018-10-02T19:56:40.000+0000
Updated2018-11-19T04:05:18.000+0000

Description

iOS app is crashing when using Titanium.UI.AUTOFILL_TYPE_PASSWORD as they getting this 2 issues:

1. Since a password text field exists then various text fields within the app will show the password toolbar even though they have no autofill type. This becomes very confusing like when you are entering text into a field called stock number and the password toolbar shows.

2. Even if I remove autoFill type password from the password field since it has a password mask set to true it will show the password toolbar. If I remove password mask it will not show the password toolbar but it will also not mask the text.

*App Link with recorded video*

[Video of the issue happening](https://github.com/jwogan5/sampleApp/blob/master/My%20Movie%201.mp4)

[The app code for the issue](https://github.com/jwogan5/sampleApp/blob/master/hypertest.zip)

*Steps to Reproduce:*

1. Using autofillType:Titanium.UI.AUTOFILL_TYPE_PASSWORD, from the above video, you can get icloud keychain opens up for a password when it got clicked. The issue occurred by going to the next page even though those fields neither an autofill nor password fields but they also show the password toolbar when click on them.

2. To show password toolbar in simulator, go to Settings > Accounts and Password > AutoFill Password turn on. You will get the issue.

Attachments

FileDateSize
TestPassword.zip2018-10-15T08:22:54.000+000057773

Comments

  1. Vijay Singh 2018-10-08

    This problem is happening only when text field of next screen is just above the user-name text field. e.g if I set property 'top' of 'modelField' text field to '20' in below mentioned text case, the problem will not happen. I'll look in same. Thanks! Test Case -
       
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var userNameField = Ti.UI.createTextField({
       top: 100,
       width: 150,
       hintText:'User Name...',
       autofillType:Titanium.UI.AUTOFILL_TYPE_USERNAME,
       backgroundColor:'red'
       });
        
       var passwordField = Ti.UI.createTextField({
       top: 200,
       width: 150,
       hintText:'Password...',
       autofillType:Titanium.UI.AUTOFILL_TYPE_PASSWORD,
       backgroundColor:'red'
       });
       
       var button = Ti.UI.createButton({
           top: 400,
           title: 'Open Next'
       });
       
       button.addEventListener('click', function(e){
           win2.open();
       });
       
       win.add(userNameField);
       win.add(passwordField);
       win.add(button);
       win.open();
       
       
       var win2 = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var modelField = Ti.UI.createTextField({
       top: 100,
       width: 150,
       hintText:'Model Name ..',
       backgroundColor:'red',
       bubbleParent: false
       });
        
       var enterField = Ti.UI.createTextField({
       top: 200,
       width: 150,
       hintText:'Eneter 1',
       backgroundColor:'red'
       });
       
       var button2 = Ti.UI.createButton({
           top: 300,
           title: 'Go Back'
       });
       
       win2.add(modelField);
       win2.add(enterField);
       win2.add(button2);
       
       button2.addEventListener('click', function(e){
        win2.close();
       });
       
  2. Vijay Singh 2018-10-08

    A work around to solve this issue is - While opening the new screen set contentType of current screen's username and password field to 'null'. While opening the previous screen again set contentType to previous one. See the modified version of above test case with this work around -
       
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var userNameField = Ti.UI.createTextField({
       top: 100,
       width: 150,
       hintText:'User Name...',
       autofillType:Titanium.UI.AUTOFILL_TYPE_USERNAME,
       backgroundColor:'red'
       });
        
       var passwordField = Ti.UI.createTextField({
       top: 200,
       width: 150,
       hintText:'Password...',
       autofillType:Titanium.UI.AUTOFILL_TYPE_PASSWORD,
       backgroundColor:'red',
       passwordMask: true
       });
       
       var button = Ti.UI.createButton({
           top: 400,
           title: 'Open Next'
       });
       
       
       button.addEventListener('click', function(e){
           userNameField.setAutofillType(null);
           passwordField.setAutofillType(null);
           passwordField.setPasswordMask(false);
           win2.open();
       });
       
       win.add(userNameField);
       win.add(passwordField);
       win.add(button);
       win.open();
       
       
       var win2 = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var modelField = Ti.UI.createTextField({
       top: 100,
       width: 150,
       hintText:'Model Name ..',
       backgroundColor:'red',
       bubbleParent: false
       });
        
       var enterField = Ti.UI.createTextField({
       top: 200,
       width: 150,
       hintText:'Eneter 1',
       backgroundColor:'red'
       });
       
       var button2 = Ti.UI.createButton({
           top: 300,
           title: 'Go Back'
       });
       
       win2.add(modelField);
       win2.add(enterField);
       win2.add(button2);
       
       button2.addEventListener('click', function(e){
       userNameField.setAutofillType(Titanium.UI.AUTOFILL_TYPE_USERNAME);
       passwordField.setAutofillType(Titanium.UI.AUTOFILL_TYPE_PASSWORD);
       passwordField.setPasswordMask(true);
        win2.close();
       });
       
  3. Vijay Singh 2018-10-15

    Thie problem is happening on native iOS app as well. I have attached native iOS app 'TestPassword.zip'. I'll file bug to apple.
  4. Vijay Singh 2018-10-16

    Filed a bug to apple https://openradar.appspot.com/radar?id=5053487494725632 .

JSON Source