PDA

View Full Version : combo error "s is null"



yannickiwi
18 Mar 2009, 2:38 AM
Hi,

on my combo on left panel on my project (http://immobilier.bluesys.ch/versions/last/indexLayout.html), after selected a priority, and click another place on my panel, I have this error:


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)

chrome://firebug/content/blank.gif if(!s.focusNode || s.focusNode.nodeType != 3){

why?

My code of store is:



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[]):


...
{
xtype: 'combo',
store: priorityStore,
displayField:'priority',
fieldLabel: 'Priorité',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Sélectionner une priorité',
selectOnFocus:true,
allowBlank: false
}
...


thanks again \:D/

yannickiwi
19 Mar 2009, 12:09 AM
up

Animal
19 Mar 2009, 12:55 AM
Have you debugged?

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

yannickiwi
19 Mar 2009, 1:10 AM
I try to debug ...

Animal
19 Mar 2009, 1:42 AM
So, what is s, where is the problem, where did the value come from?

yannickiwi
19 Mar 2009, 2:00 AM
of ext-all-debug.js (ligne 30845)



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 }

Animal
19 Mar 2009, 2:36 AM
So, you can see from just looking at the code that it's using https://developer.mozilla.org/en/DOM/window.getSelection which should not return null.

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

Has it been corrupted?