Ignore:
Timestamp:
03/03/10 18:56:07 (2 years ago)
Author:
sys
Message:

Fermer les onglets : get focus sur les dirty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Xul_Core/content/scenariCore/widgets/matrix/matrix.xbl.xml

    r15018 r15020  
    172172                                        vSelectedIndex++; 
    173173                                    } 
    174                                         //if(val && val.getAttribute("closed")=="true") val.openView(); 
    175174                                    if(this.fDeck.selectedIndex != vSelectedIndex) { 
    176175                                        //L'index dans le desk a changé. 
     
    655654                                try { 
    656655                                        if(this.fView) { 
    657                                                 this.fView.closeView(); 
     656                                                return this.fView.closeView(); 
    658657                                        } else { 
    659658                                                //Onglet sans view, curieux, on redraw les onglets. 
     659                                                log.debug("XXX tab with no view ?"); 
    660660                                                this.fSlot.selectedView = this.fSlot.searchPreviousSelectedView(); 
     661                                                return true; 
    661662                                        } 
    662663                                }catch(e){ 
     
    732733                                <body><![CDATA[ 
    733734                                        if(this.getAttribute("closed")=="true") return true; 
    734                                         if( ! this.canUnload(false)) return false; 
     735                                        if( ! this.canUnload(true)) { 
     736                                                //On s'assure qu'on détient le focus. 
     737                                                this.fSlot.selectedView = this; 
     738                                                if( ! this.canUnload(false)) return false; 
     739                                        } 
    735740                                        this.setAttribute("closed", "true"); 
    736741                                        this.onDefinitionUpdates(); 
     
    744749                        <method name="closeViewByRemove"> 
    745750                                <body><![CDATA[ 
    746                                         if( ! this.canUnload(false)) return false; 
     751                                        if( ! this.canUnload(true)) { 
     752                                                //On s'assure qu'on détient le focus. 
     753                                                this.fSlot.selectedView = this; 
     754                                                if( ! this.canUnload(false)) return false; 
     755                                        } 
    747756                                        var vSlot = this.fSlot; 
    748757                                        var vOldViewSel = vSlot.selectedView; 
Note: See TracChangeset for help on using the changeset viewer.