macOS AppKit: Strange dragging behavior of modeless NSSavePanel

82 views Asked by At

When I create a NSSavePanel to be modeless, the dragging behavior is very strange:

  • It does not react to dragging attempts in the title bar

  • When I initiate the drag in other areas of the panel, it will first jump down a few pixels and then dragging continues normally.

This is my code:

       NSSavePanel *sp = [NSSavePanel savePanel];
       // don't forget to set filename etc...
       [sp beginWithCompletionHandler:^(NSInteger result) {
           if (result == NSFileHandlingPanelOKButton) {
                   //
               }
       }];

And also I have a problem, when some other apps become full screen, I want the save panel can over other apps, but not use

[NSApp activateIgnoringOtherApps:YES];

I use

[sp makeKeyAndOrderFront:nil];
[sp orderFrontRegardless];

but not work.

Thanks for the help, and merry christmas.

1

There are 1 answers

0
Tobi On

The jump was a bug in AppKit, resolved in macOS 10.13.