We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7895ad4 commit 5b68f3eCopy full SHA for 5b68f3e
native/Avalonia.Native/src/OSX/WindowBaseImpl.mm
@@ -143,6 +143,19 @@
143
144
@autoreleasepool {
145
if (Window != nullptr) {
146
+
147
+ // If window is hidden without ending attached sheet first, it will stuck in "order out" state,
148
+ // and block any new sheets from being attached.
149
+ // Additionaly, we don't know if user would define any custom panels, so we only end/close file dialog sheets.
150
+ auto attachedSheet = Window.attachedSheet;
151
+ if (attachedSheet
152
+ && ([attachedSheet isKindOfClass: [NSOpenPanel class]]
153
+ || [attachedSheet isKindOfClass: [NSSavePanel class]]))
154
+ {
155
+ [Window endSheet:attachedSheet];
156
+ [attachedSheet close];
157
+ }
158
159
auto frame = [Window frame];
160
161
AvnPoint point;
0 commit comments