Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    4
    Vote Rating
    0
    byemen is on a distinguished road

      0  

    Default Picker Bug?

    Picker Bug?


    REQUIRED INFORMATION Sencha Touch version tested:
    • Sencha Touch 2.1.1
    Browser versions tested against:
    • ios6 Safari
    DOCTYPE tested against:
    • HTML5
    Description:
    • If I click a done button on a picker(selectfield or datepicker)
      it changes focus to other textfield automatically(an empty one!)
    Code:
     Ext.define('SFA-BMT.view.CustSimple',{
        extend: 'Ext.form.FormPanel',
        xtype:'custSimple',
        
        requires: [
                   'Ext.form.FieldSet',
                   'Ext.field.DatePicker',
                   'Ext.Date'
        ],
        loadCombo: function(record){
            Ext.getCmp('selectGrp_form').setStore(Ext.getCmp('selectGrp').getStore());
            Ext.getCmp('selectCustType_form').setStore(Ext.getCmp('selectCustType').getStore());
            return true;
        },
        config:{
            title:'고객정보',
            items:[{ 
                xtype:'fieldset',
                items:[
                           {
                           xtype: 'textfield',
                           label: '고객명',
                           name: 'CUST_NM',
                           placeHolder:'고객명'
                           },{
                           xtype: 'textfield',
                           name: 'CUST_SEQ',
                           hidden: true
                        },{
                            xtype: 'selectfield',
                            label: '고객 TYPE',
    //                        labelWidth: '100',
                            id: 'selectCustType_form',
                            name:'CUST_TYPE',
                            displayField : 'CODE_NM',
                            valueField : 'CODE',
                            listeners: {
                                change: function (field, evt) {
                                    //Ext.getCmp('myFieldSet').setTitle(field.getValue());
                                } // keyup
                            } // listeners
                       },{
                           xtype: 'textfield',
                           label: '핸드폰',
                           name: 'HP',
                           placeHolder:'핸드폰'
                       },{
                           xtype: 'searchfield',
                           label: '우편번호',
                           name: 'ZIP_REG',
                           placeHolder:'ZIP',
                           scope: this,
                           listeners: {
                               tap:function(field,evt){
                                   alert("a");
                               },
                               focus:function(field,evt){
                                   alert("b");
                                   return false;
                               }
                           }
    //                   },{
    //                       xtype: 'textfield',
    //                        component: {
    //                            xtype: 'container', 
    //                            layout: 'hbox',
    //                            style:'border:none',
    //                            items: [{
    //                                    xtype: 'textfield', 
    //                                    style:'border:none',
    //                                    label: '우편번호',
    //                                    labelWidth:'150px',
    //                                    name: 'ZIP_REG',
    //                                    placeHolder:'우편번호',
    //                                },{
    //                                    xtype: 'button',
    //                                    iconCls:'search',
    //                                    iconMask: true,
    //                                    handler: function(){
    //                                        alert('우편번호');
    //                                    }
    //                                }
    //                            ]
    //                        }
                       },{
                           xtype: 'textfield',
                           label: '주소',
                           name: 'ADDR_REG',
                           id:'addr1',
                           placeHolder:'우편번호를 입력하세요.'
    //                   },{
    //                       xtype: 'textfield',
    //                       label: '상세주소',
    //                       name: 'ADDR_NO_REG',
    //                       id:'addr2',
    //                       placeHolder:'상세주소를 입력하세요.'
                       },{
                            xtype: 'selectfield',
                            label: 'SC GROUP',
    //                        labelWidth: '100',
                            id: 'selectGrp_form',
                            name: 'SC_GRP_SEQ',
                            emptyText:'그룹지정',
                            displayField : 'CODE_NM',
                            valueField : 'CODE',
                            listeners: {
                                change: function (field, evt) {
                                    //this.getStore().filter("",field.getValue());
                                } // keyup
                            } // listeners
                       },{
                           xtype:'datepickerfield',
                           dateformat: 'Y-m-d',
                           name:'BIRTH',
                           label:'생일',
                           picker: {
                                slotOrder: ['year', 'month', 'day'],
                                useClearIcon: true,
                                //hideOnMaskTap: true,
                                yearText:'년',
                                monthText:'월',
                                datText:'일',
                                yearFrom: 1950,
                                yearTo: new Date().getFullYear(),
                                doneButton: '완료',
                                useTitle:true
                           }
    
                       }
                ]
            },{
                xtype: 'button',
                text: '저장',
                ui: 'confirm',
                id: 'save',
                handler: function(){
    //                this.up('custSimple').setRecord(loadedRecord);
                }
            }]
        }
    });
    Screenshot or Video:
    • attached
    See this URL for live test case: http://screencast.com/t/3JWGoosamAD

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    does it focus on the field that is under the done button?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    4
    Vote Rating
    0
    byemen is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    does it focus on the field that is under the done button?
    Thanks for your concern! really appreciate that.
    my answer is not always. It moves randomly even if I set a tabIndex config, it doesn't seem move as the index.

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2011
    Posts
    3
    Vote Rating
    0
    enagic is on a distinguished road

      0  

    Default Confirmed

    Confirmed


    I have confirmed that the buttons OK and Cancel are "transparent" as far as events are concerned. It seems that when the user presses either buttons the fields just immediately behind those buttons will be focused.

    Most of the time it's just a nuisance, but it proved to be definitely a problem when there are several picker fields in the form and the user sets it up just right so that the buttons are lined up just above another picker field and they're stuck in that modal mode no matter what button they press.

    I have an example developmental here:

    http://prodgress.s3.amazonaws.com/index.html

    Also confirmed that it's only an iPhone (possibly iOS) issue on version 6 and 7. Android doesn't seem to be affected by it.

    Any solution to the problem?

Thread Participants: 2

Tags for this Thread