mirror of
https://github.com/Eugeny/tabby.git
synced 2025-01-06 13:44:36 +08:00
fixed tab focus loss - fixes #2525
This commit is contained in:
parent
9e2d070ed4
commit
3a76e0bb2e
@ -529,21 +529,24 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
|
|||||||
if (child instanceof SplitContainer) {
|
if (child instanceof SplitContainer) {
|
||||||
this.layoutInternal(child, childX, childY, childW, childH)
|
this.layoutInternal(child, childX, childY, childW, childH)
|
||||||
} else {
|
} else {
|
||||||
const element = this.viewRefs.get(child)!.rootNodes[0]
|
const viewRef = this.viewRefs.get(child)
|
||||||
element.classList.toggle('child', true)
|
if (viewRef) {
|
||||||
element.classList.toggle('maximized', child === this.maximizedTab)
|
const element = viewRef.rootNodes[0]
|
||||||
element.classList.toggle('minimized', this.maximizedTab && child !== this.maximizedTab)
|
element.classList.toggle('child', true)
|
||||||
element.classList.toggle('focused', child === this.focusedTab)
|
element.classList.toggle('maximized', child === this.maximizedTab)
|
||||||
element.style.left = `${childX}%`
|
element.classList.toggle('minimized', this.maximizedTab && child !== this.maximizedTab)
|
||||||
element.style.top = `${childY}%`
|
element.classList.toggle('focused', child === this.focusedTab)
|
||||||
element.style.width = `${childW}%`
|
element.style.left = `${childX}%`
|
||||||
element.style.height = `${childH}%`
|
element.style.top = `${childY}%`
|
||||||
|
element.style.width = `${childW}%`
|
||||||
|
element.style.height = `${childH}%`
|
||||||
|
|
||||||
if (child === this.maximizedTab) {
|
if (child === this.maximizedTab) {
|
||||||
element.style.left = '5%'
|
element.style.left = '5%'
|
||||||
element.style.top = '5%'
|
element.style.top = '5%'
|
||||||
element.style.width = '90%'
|
element.style.width = '90%'
|
||||||
element.style.height = '90%'
|
element.style.height = '90%'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
offset += sizes[i]
|
offset += sizes[i]
|
||||||
|
Loading…
Reference in New Issue
Block a user