// Corrige un bug spécifique à firefox : Le contenu d'une combobox (ou checkboxcombo)
// ne s'affiche pas quand on clique directement sur le contenu emptyText.
// Par rapport au code original récupéré à l'url ci-dessous, l'override est effectué
// sur Ext.form.TriggerField directement et non Ext.form.ComboBox, pour qu'il fonctionne
// avec d'autres composants dérivés, du type Ext.ux.form.CheckboxCombo.
// source : http://www.sencha.com/forum/showthread.php?105042-OPEN-1224-Combobox-click-on-quot-empty-text-quot-issue&p=503781#post503781

Ext.override(Ext.form.TriggerField, {
    updateEditState: function(){
        if(this.rendered){
            if (this.readOnly) {
                this.el.dom.readOnly = true;
                this.el.addClass('x-trigger-noedit');
                this.mun(this.el, 'mousedown', this.onTriggerClick, this);
                this.trigger.setDisplayed(false);
            } else {
                if (!this.editable) {
                    this.el.dom.readOnly = true;
                    this.el.addClass('x-trigger-noedit');
                    this.mon(this.el, 'mousedown', this.onTriggerClick, this);
                } else {
                    this.el.dom.readOnly = false;
                    this.el.removeClass('x-trigger-noedit');
                    this.mun(this.el, 'mousedown', this.onTriggerClick, this);
                }
                this.trigger.setDisplayed(!this.hideTrigger);
            }
            this.onResize(this.width || this.wrap.getWidth());
        }
    }
});

