After deleting the last tab, try setting tabpanel's selectedTab property to some existent tab.
Yes, a tried that before. But I am using dynamic tabs and because that I don't have id for tab
(and haven't id for selected Tab). Any idea?
just create the names in your model for every tab. and after setting it you'll be able to operate with selectedTab through them.