Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

What’s the best way to deal with windows/dialogs that don’t fully close?

Explorer ,
Sep 22, 2025 Sep 22, 2025

I have an ExtendScript script, which creates a dialog/window, where users can insert some arguments, etc.

 

...
// This is the method that creates the window and displays it
 
window.buttons.run.onClick = function () {
window.close(1);
};

window.buttons.cancel.onClick = function () {
window.close(2);
};

window.defaultElement = window.buttons.run;
window.cancelElement = window.buttons.cancel;

var result = window.show();

return result;

}


// Then in the main function
var result = createWindow();
if (result !== 1) {
return;
}

// Do some heavy work

Occasionally, when I click to run the script, the photoshop hangs up for a while (as usual), but the window does not fully close. More specifically, I don’t see the window elements, like buttons, texts, etc., anymore, I see only the window with a blank/white background and the title. See the screenshot below.

blank_dialog_problem.jpg
 

This blank dialog remains open all the time until I force close photoshop. The script execution continues and even finishes, but the window remains opened.

 

I suspect that this behaviour is due to the fact that close() doesn’t actually block, so the window may not be fully closed and cleaned once it returns.

What’s the best solution to solve this problem?

$.sleep(1000) does not seem to help and it's just seems wrong to use a sleep anyway. I suppose what we need is to just execute the heavy work until the window is fully closed. 

I also tried to call app.refresh() before the heavy work, but I also don't know if this really solves the issue. 

TOPICS
Actions and scripting
85
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Sep 22, 2025 Sep 22, 2025

Hi!

What computer are you working on? Mac or Windows? What version of Photoshop? Have you checked to see that your computer is compatible with the version of Photoshop you are currently running? 

Michelle

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 23, 2025 Sep 23, 2025

I'm using Mac OS Sequoia (15.6.1) and Photoshop 26.9.0.

 

Here they indeed recommend Mac OS Sonoma, which is a prequel to Sequoia, but this issue has been happening to me for a long time (at least 1 year). I am quite sure I also had it with Sonoma.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 23, 2025 Sep 23, 2025

And I have a MacBook Pro with Apple M3 Max with 36GB, which is a relatively powerful machine.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 23, 2025 Sep 23, 2025
LATEST

Yes! Very powerful!

Did you also check to see if your graphics card is compatible and up to date? Here is an Adobe Help doc that talks about some of the issues that are caused by the GP card—one of them is incorrectly rendered windows. 

 

https://helpx.adobe.com/photoshop/kb/troubleshoot-gpu-graphics-card.html

 

Check this out and let us know if this fixes the issue or if it still persists?

Michelle

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines