Resync terminal portals after sidebar changes (#1253)
* Add regression test for portal ancestor shifts * Resync terminal portals after sidebar changes * Restore safeHelp view helper * Fix portal geometry regression test harness
This commit is contained in:
parent
292359f600
commit
8d5a1f611d
4 changed files with 100 additions and 1 deletions
|
|
@ -2591,10 +2591,14 @@ struct ContentView: View {
|
|||
if abs(sidebarState.persistedWidth - sanitized) > 0.5 {
|
||||
sidebarState.persistedWidth = sanitized
|
||||
}
|
||||
// Sidebar width changes are pure SwiftUI layout updates, so portal-hosted
|
||||
// terminals need an explicit post-layout geometry resync.
|
||||
TerminalWindowPortalRegistry.scheduleExternalGeometrySynchronizeForAllWindows()
|
||||
updateSidebarResizerBandState()
|
||||
})
|
||||
|
||||
view = AnyView(view.onChange(of: sidebarState.isVisible) { _ in
|
||||
TerminalWindowPortalRegistry.scheduleExternalGeometrySynchronizeForAllWindows()
|
||||
updateSidebarResizerBandState()
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue