Browse Source

fix switching tabs with shortcuts

pull/2574/head
Jakub Wasak 5 years ago
parent
commit
ceec182e80
  1. 21
      ext/src/tab/Panel.js

21
ext/src/tab/Panel.js

@ -43,12 +43,12 @@
* } * }
* }] * }]
* }); * });
* *
* ## Vetoing Changes * ## Vetoing Changes
* *
* User interaction when changing the tabs can be vetoed by listening to the {@link #beforetabchange} event. * User interaction when changing the tabs can be vetoed by listening to the {@link #beforetabchange} event.
* By returning `false`, the tab change will not occur. * By returning `false`, the tab change will not occur.
* *
* @example * @example
* Ext.create('Ext.tab.Panel', { * Ext.create('Ext.tab.Panel', {
* renderTo: Ext.getBody(), * renderTo: Ext.getBody(),
@ -66,7 +66,7 @@
* }, { * }, {
* title: 'P3' * title: 'P3'
* }] * }]
* }); * });
* *
* # Examples * # Examples
* *
@ -316,8 +316,8 @@ Ext.define('Ext.tab.Panel', {
/** /**
* @cfg {"top"/"bottom"/"left"/"right"} tabPosition * @cfg {"top"/"bottom"/"left"/"right"} tabPosition
* The position where the tab strip should be rendered. Possible values are: * The position where the tab strip should be rendered. Possible values are:
* *
* - top * - top
* - bottom * - bottom
* - left * - left
@ -488,13 +488,13 @@ Ext.define('Ext.tab.Panel', {
tabBar.setActiveTab(activeTab.tab, true); tabBar.setActiveTab(activeTab.tab, true);
} }
}, },
/** /**
* @method getTabBar * @method getTabBar
* Returns the {@link Ext.tab.Bar} associated with this tabPanel. * Returns the {@link Ext.tab.Bar} associated with this tabPanel.
* @return {Ext.tab.Bar} The tabBar for this tabPanel * @return {Ext.tab.Bar} The tabBar for this tabPanel
*/ */
/** /**
* @method setTabBar * @method setTabBar
* @hide * @hide
@ -573,6 +573,9 @@ Ext.define('Ext.tab.Panel', {
else { else {
Ext.resumeLayouts(true); Ext.resumeLayouts(true);
} }
var currentTab = me.getActiveTab();
var content = currentTab.body.dom.querySelector('webview');
if (content) content.focus();
return card; return card;
} }
return previous; return previous;
@ -771,7 +774,7 @@ Ext.define('Ext.tab.Panel', {
onItemIconChange: function(item, newIcon) { onItemIconChange: function(item, newIcon) {
item.tab.setIcon(newIcon); item.tab.setIcon(newIcon);
}, },
/** /**
* @private * @private
* Update the tab iconCls when panel iconCls has been set or changed. * Update the tab iconCls when panel iconCls has been set or changed.

Loading…
Cancel
Save