fix: prevent stale popup background regions
This commit is contained in:
@@ -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(_:)))
|
||||
|
||||
Reference in New Issue
Block a user