Fixed issue 20024: Set focus well when selecting a tab using the picker list.
authorMiguel de Juana <miguel.dejuana@openbravo.com>
Tue, 24 Apr 2012 13:34:38 +0200
changeset 16190 ee033a584373
parent 16189 75eb428bb97a
child 16191 95aa801f9e03
child 16374 97818dee6617
Fixed issue 20024: Set focus well when selecting a tab using the picker list.
If there is not enough space to display all the tab-buttons in the tabSet, should a drop-down "picker" be displayed to allow selection of tabs that are clipped. Selecting a tab using this "picker", the chosen tab is selected but not focused. The behaviour focusing a tab using picker is the same as when the main tab is drawn. To solve this, it has been created a validation to know if picker exist or not.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js	Tue Apr 24 13:41:44 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js	Tue Apr 24 13:34:38 2012 +0200
@@ -334,6 +334,9 @@
   // when a tab is drawn the first time it steals the focus 
   // from the active view, prevent this
   focus: function () {
+    if(this.parentElement.tabSet.tabPicker){
+	  this.pane.setAsActiveView();
+	} 
     if (this.pane.isActiveView && this.pane.isActiveView()) {
       this.Super('focus', arguments);
     }