truestone Lv 1
If you launch a dialog with ScriptV2, the return value of dialog.Show is supposed to identify the button pressed. The doc says that if the user presses the X button in the upper right corner, the return value should be 0. But in reality, the return value is the value that wat last returned by dialog.Show, so the button id that from the previous dialog, which may be completely unrelated to the dialog just closed.