Results 1 to 4 of 4

Thread: Picker Bug?

    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
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Vote Rating
    1297
      0  

    Default

    does it focus on the field that is under the done button?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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
      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
    46
    Vote Rating
    21
      0  

    Default 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?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •