getFileForOpening not shown as a modal dialog?

I’m, trying to swap my ExtendScript File.openDialog(..) call to the “modern” storage.localFileSystem.getFileForOpening(..) but I’m having some issues. It appears that the later (unlike the former) is not shown modal way, meaning that the main InDesign window remains active and when the user clicks on that the file-open dialog remains active but is hidden behind InDesign’s window which causes some confusing behavior on the user’s side. Is this a known issue, intended behavior or am I doing something odd here?

I’m invoking it (via an async/await) through the onClick of an sp-action-button UXP Spectrum Widget (not a WebComponent) on Windows, haven’t tried it on a Mac yet.

FWIW it doesn’t appear to be modal on the Mac either (at least not with the code that I have been using).

On the Mac it behaves a little differently to how you describe it on a Windows machine. If you click on the main window or another panel, you can do things (hence it’s not modal), but the dialog doesn’t move behind anything (it’s not hidden). It just sits there in the middle of the screen above everything else. In fact if you switch to another application, it’s still sitting there in the middle of the screen! Only true modal dialogs seem to appear above it.

Unfortunately I don’t know whether there is any way to make it act in a truly modal fashion.

Philip

1 Like