mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-04 08:06:16 +00:00
If the targetView of attachedWindow has no more window, close the popover instead of trying to reposition it
This commit is contained in:
1 parent
4acd11d649
commit
348d689243
1 file changed
+6
@@ -189,6 +189,12 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
|
||||
// TODO: don't recompute everything, just compute the move offset
|
||||
var edge = [_windowView preferredEdge];
|
||||
|
||||
if (![_targetView window])
|
||||
{
|
||||
[self _close]
|
||||
return;
|
||||
}
|
||||
|
||||
[self positionRelativeToRect:nil ofView:_targetView preferredEdge:edge];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user