mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-09 01:51:53 +00:00
fixed #8028 - ghost panes and missing pane drag handle
This commit is contained in:
@@ -192,6 +192,14 @@ export abstract class BaseTabComponent extends BaseComponent {
|
||||
this.viewContainer = undefined
|
||||
}
|
||||
|
||||
get topmostParent (): BaseTabComponent|null {
|
||||
let parent = this.parent
|
||||
while (parent?.parent) {
|
||||
parent = parent.parent
|
||||
}
|
||||
return parent
|
||||
}
|
||||
|
||||
/**
|
||||
* Called before the tab is closed
|
||||
*/
|
||||
|
@@ -458,12 +458,18 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
|
||||
tab.destroy()
|
||||
}
|
||||
|
||||
let allTabs: BaseTabComponent[] = []
|
||||
if (thing instanceof BaseTabComponent) {
|
||||
if (thing.parent instanceof SplitTabComponent) {
|
||||
thing.parent.removeTab(thing)
|
||||
allTabs = [thing]
|
||||
} else if (thing instanceof SplitContainer) {
|
||||
allTabs = thing.getAllTabs()
|
||||
}
|
||||
for (const tab of allTabs) {
|
||||
if (tab.parent instanceof SplitTabComponent) {
|
||||
tab.parent.removeTab(tab)
|
||||
}
|
||||
thing.removeFromContainer()
|
||||
thing.parent = this
|
||||
tab.removeFromContainer()
|
||||
tab.parent = this
|
||||
}
|
||||
|
||||
let target = relative ? this.getParentOf(relative) : null
|
||||
|
Reference in New Issue
Block a user