Here's my workaround:
Public Function ShowSelectFolderDialog(promptTxt as string = "Select a destination folder.", buttonCaption as string = "Select") as Folderitem
// start by assigning an existing folderitem that we know is not a directory
dim f As FolderItem = App.ExecutableFile
while not f.Directory
// accept only a directory or a nil folderitem as the result of the dialog
Dim dlg As New SelectFolderDialog
dlg.ActionButtonCaption = "Select"
dlg.PromptText = "Select a destination folder."
f = dlg.ShowModal
if f = Nil then exit while
Then whenever I want a select folder dialog, I use:
dim f As FolderItem = ShowSelectFolderDialog
With this workaround, if a user clicks the Select button to dismiss the dialog with the erroneous file pre-selected, the dialog just remains open, until they either cancel or click away from the selected item to a folder, or click somewhere outside the list to select the parent directory of the erroneously pre-selected file. This works on Mac, not tested on Windows. I'm away from my Windows laptop so can't test this -- anyone want to try this code on Windows?