diff --git a/AppKit/_CPPopoverWindow.j b/AppKit/_CPPopoverWindow.j index b801b880d..32082d1d1 100644 --- a/AppKit/_CPPopoverWindow.j +++ b/AppKit/_CPPopoverWindow.j @@ -543,6 +543,7 @@ var _CPPopoverWindow_shouldClose_ = 1 << 0, #endif [_targetView removeObserver:self forKeyPath:@"frame"]; + [_parentWindow removeChildWindow:self]; [super _orderOutRecursively:recursive]; _shouldPerformAnimation = YES; diff --git a/Tests/Manual/AttachedSheet2/SheetWindowController.j b/Tests/Manual/AttachedSheet2/SheetWindowController.j index c53da14e6..e40f49ebb 100644 --- a/Tests/Manual/AttachedSheet2/SheetWindowController.j +++ b/Tests/Manual/AttachedSheet2/SheetWindowController.j @@ -475,8 +475,8 @@ [viewController setView:[[self window] contentView]]; [aPopover setContentSize:[[[self window] contentView] boundsSize]]; [aPopover setAnimates:YES]; - [aPopover showRelativeToRect:[sender bounds] ofView:sender preferredEdge:CPMaxXEdge]; [aPopover setBehavior:CPPopoverBehaviorTransient]; + [aPopover showRelativeToRect:[sender bounds] ofView:sender preferredEdge:CPMaxXEdge]; } //