Our new NPAPI plugin is 32/64 bit pure Cocoa Everything runs great with 32/64 bit FireFox (release candidate Minefield) and 32 bit Safari However, on 64-bit Safari Cocoa behaves strangely with respect to dialogs (We sometimes use a system dialog to open a file or perform page setup for printing) This bug is easy to reproduce. Simply call [NSApp runPageLayout:nil] from any NPAPI plugin. The dialog will come up & work fine but when you click OK it always acts like you clicked Cancel. Bring the dialog up multiple times you will see: your changes are never remembered, because it thinks you clicked cancel every time. Now try the same thing with FireFox 32 or 64, it works fine. Here is more detail on what is happening StopModalWithCode always passes a zero to runModalForWindow, no matter what button was clicked This would happen if we were calling StopModalWithCode on a secondary thread, but we have confirmed that this is not the case: WebKitPluginHost.app is running our plugin on the main thread. Please fix this and/or let me know how to help. Thanks, Bill Appleton CTO @ DreamFactory Software
This has been fixed in Safari 5!
Hi All, sometimes when my NPAPI plugin shows a dialog on the first event Safari 64 is thrown into modal mode and does not come out when the dialog is dismissed i have watched this happen in the debugger, the modal mode is started when the dialog is dismissed and Safari hangs in modal mode after that so there is some hole in modal mode when the dialog is shown early in the NPAPI plugin boot process Best, Bill Appleton DreamFactory Software
hi all, OK, more information on this bug the CFRunLoopPerformBlock is called in WKPCSetModal because the host is busy processing requests so two WKPCSetModal calls are stacked up, one for going into modal mode, another for ending modal mode but on exit only the WKPCSetModal(true) is used, and so Safari goes into modal mode & won't come out the WKPCSetModal(false) is lost