fix: prevent stale popup background regions

This commit is contained in:
2026-10-18 01:22:16 +02:00
parent f12ef7e7a1
commit 75c9a329d6
3 changed files with 4 additions and 3 deletions
@@ -45,7 +45,6 @@ import Testing
var selections: [Bool] = []
popup.selectProvider = { selections.append($0) }
popup.showProviders(selectedOpenAI: true, relativeTo: anchor)
host.layoutSubtreeIfNeeded()
let rect = popup.view.convert(popup.view.bounds, to: host)
#expect(rect.maxY == pill.frame.maxY)
#expect(rect.minY < pill.frame.minY)
@@ -56,7 +55,6 @@ import Testing
// Reopen during the close animation, then switch modes without retaining the old anchor.
popup.showTranslation(relativeTo: anchor)
popup.showProviders(selectedOpenAI: false, relativeTo: anchor)
host.layoutSubtreeIfNeeded()
#expect(popup.view.convert(popup.view.bounds, to: host).maxY == pill.frame.maxY)
popup.moveSelection(by: 1)
_ = popup.handle(#selector(NSResponder.insertNewline(_:)))