PDA

View Full Version : [FIXED] Inconsistency on closing tabpanel items



bret
13 Feb 2012, 1:25 AM
REQUIRED INFORMATION

Ext version tested:
Ext 4.0.7 rev ???

Browser versions tested against:
Chrome, Firefox

DOCTYPE tested against:
HTML5

Description:
Closing a tabpanels item behaves different when clicking the close button than to using the API (remove()-Method).
Closing a tab item via the close button activates the item to its left. Using the remove()-Method the item to its right is selected afterwards. So when assigning a keyboard shortcut to close tabs they behave different than using the mouse.

Steps to reproduce the problem:

use a tabpanel
open at least 4 (closable) tabs
select a middle tab
close one by clicking the close item, another by calling the remove-Method on its container


The result that was expected:
In both cases the same item should be focussed afterwards

The result that occurs instead:
A different tab is focussed depending on the procedure taken

HELPFUL INFORMATION

Debugging already done:
none

Possible fix:
not provided


Operating System:
Mac OSX

mitchellsimoens
13 Feb 2012, 6:15 AM
Either way it really should remember the last tab that was selected and that should be the one it make active.

To test this, I added this button to the tabs-adv.html example:


Ext.createWidget('button', {
renderTo: 'addButtonCt',
text: 'Remove Active Tab',
handler: function () {
var active = tabs.activeTab;

tabs.remove(active);
},
iconCls:'new-tab',
style: 'margin-left: 8px;'
});