1. #1
    Developer... jon.whitcraft's Avatar
    Join Date
    Mar 2007
    Posts
    391
    Vote Rating
    0
    jon.whitcraft is on a distinguished road

      0  

    Default 1.0[b1] JSONReader Combo Box Strange Behavior

    I have a dynamic combo box and a static Ext combo box and i just noticed something this morning.

    When you click on the dynamic combo box and open up the options it has the first one selected but if you don't select an option and just click off the control and then open it again it has the second one selected not the first. It does this till it gets to the end.

    here is my test page.

    http://dev2.indycar.com/online/jon/combobox/

    Series is the dynamic one and Status is just a transformed select box. It does this in both FF2 and IE7
    Jon
    Lead Internal Application Engineer - SugarCRM
    h2ik.co

  2. #2
    Ext User
    Join Date
    Mar 2007
    Posts
    31
    Vote Rating
    0
    oxi is on a distinguished road

      0  

    Default

    Thanks for the example. Did you solve this issue yet?

  3. #3
    Developer... jon.whitcraft's Avatar
    Join Date
    Mar 2007
    Posts
    391
    Vote Rating
    0
    jon.whitcraft is on a distinguished road

      0  

    Default

    No i have not. I'm waiting to see if it's fixed with beta 2.
    Jon
    Lead Internal Application Engineer - SugarCRM
    h2ik.co

  4. #4
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default

    interesting... saw this line in ext-all-debug.js line 19533:
    Code:
    this.selectNext();
    called from the ComboBox's onLoad() method.

    that's the only suspicious line i see. try setting a b.p. there and let us know what you discover.


    p.s.: attached below is the selectNext() method for reference:
    Code:
    selectNext : function(){
        var ct = this.store.getCount();
        if(ct > 0){
            if(this.selectedIndex == -1){
                this.select(0);
            }else if(this.selectedIndex < ct-1){
                this.select(this.selectedIndex+1);
            }
        }
    }

  5. #5
    Developer... jon.whitcraft's Avatar
    Join Date
    Mar 2007
    Posts
    391
    Vote Rating
    0
    jon.whitcraft is on a distinguished road

      0  

    Default

    that is what is causing it as it's not re running the query as you have not selected anything..
    Jon
    Lead Internal Application Engineer - SugarCRM
    h2ik.co

  6. #6
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default

    haha. so he's cycling through all options for you when u don't select anything... strange behaviour IMO but perhaps he had something in mind when he put it there. anyhow, it seems fine to just remove it / override the function for now since the only impact it makes is visual.

  7. #7
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    18
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default

    This is fixed in svn. (should be)
    Jack Slocum
    Sencha Co-Founder, Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum

Thread Participants: 3