Results 1 to 7 of 7

Thread: combo error "s is null"

  1. #1

    Default combo error "s is null"

    Hi,

    on my combo on left panel on my project, after selected a priority, and click another place on my panel, I have this error:
    Code:
    s is null
    onFirstFocus()()ext-all-debug.js (ligne 30845)
    updateToolbar()()ext-all-debug.js (ligne 30900)
    onEditorEvent()(Object browserEvent=Event mousedown button=0)ext-all-debug.js (ligne 30892)
    h()()ext-all-debug.js (ligne 1723)
    call()()ext-all-debug.js (ligne 6592)
    
    [IMG]chrome://firebug/content/blank.gif[/IMG]            if(!s.focusNode || s.focusNode.nodeType != 3){
    why?

    My code of store is:

    Code:
    var priorityStore = new Ext.data.SimpleStore({
            fields: [
                'id',
                'priority'
            ],
            
            data: [
                ['1','1'],
                ['2','2'],
                ['3','3'],
                ['4','4'],
                ['5','5']
            ],
            autoLoad: true,
        });
    code of combo (is into a items[]):
    Code:
    ...
    {
                    xtype: 'combo',
                    store: priorityStore,
                    displayField:'priority',
                    fieldLabel: 'Priorit',
                    typeAhead: true,
                    mode: 'local',
                    triggerAction: 'all',
                    emptyText:'Slectionner une priorit',
                    selectOnFocus:true,
                    allowBlank: false
                }
    ...
    thanks again

  2. #2

    Default

    up

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Have you debugged?

    Or have you spent all day waiting for someone to remotely debug for you?

  4. #4

    Default

    I try to debug ...

  5. #5
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    So, what is s, where is the problem, where did the value come from?

  6. #6

    Default

    of ext-all-debug.js (ligne 30845)

    Code:
    if(Ext.isGecko){ // prevent silly gecko errors30843            this.win.focus();
    30844            var s = this.win.getSelection();
    30845            if(!s.focusNode || s.focusNode.nodeType != 3){
    30846                var r = s.getRangeAt(0);
    30847                r.selectNodeContents(this.getEditorBody());
    30848                r.collapse(true);
    30849                this.deferFocus();
    30850            }

  7. #7
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    So, you can see from just looking at the code that it's using https://developer.mozilla.org/en/DOM...w.getSelection which should not return null.

    So, if you break at that line, and examine this.win, what is it?

    Has it been corrupted?

Posting Permissions

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