# Bring Photoshop to front

**URL:** <https://forums.creativeclouddeveloper.com/t/bring-photoshop-to-front/7564>\
**Category:** Photoshop\
**Tags:** uxp, javascript\
**Created:** [February 22, 2024, 4:18pm UTC](https://forums.creativeclouddeveloper.com/t/bring-photoshop-to-front/7564 "2024-02-22T16:18:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@Lars](https://forums.creativeclouddeveloper.com/u/Lars)\
**Post date:** [February 22, 2024, 4:18pm UTC](https://forums.creativeclouddeveloper.com/t/bring-photoshop-to-front/7564/1 "2024-02-22T16:18:13Z")

</div>

Hi,  
I try to bring Photoshop to the front. The whole action is triggered by a client (in this case a browser) which posts a messages via STOMP to the UXP script in Photoshop.  
Photoshop’s UXP gets the message and displays a dialog with showModal. Unfortunately under Windows this doesn’t bring Photoshop to the front (under macOS it works) but let the Photoshop application blink in Windows’ task bar. That’s why I tried to call application [bringToFront](https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/photoshop/#bringtofront):

```auto
async triggerBringToFront() {
  await require("photoshop").core.executeAsModal(myBringToFrontFunction, {"commandName": "Bring PS to front"});
}

async myBringToFrontFunction(executionContext, descriptor) {
        try {
            const app = require('photoshop').app;
            await app.bringToFront();
        } catch (e) {
            logger.errorLog('Failed: ', e);
        }
 }

```

The code doesn’t throw an error but it also does not work. What am I doing wrong. Or is bringToFront the wrong function?

Best regards  
Lars  
.
