# \`window.alert\` in a UXP plugin crashes InDesign

**URL:** <https://forums.creativeclouddeveloper.com/t/window-alert-in-a-uxp-plugin-crashes-indesign/6647>\
**Category:** InDesign\
**Tags:** plugin, bug, uxp\
**Created:** [August 8, 2023, 1:26pm UTC](https://forums.creativeclouddeveloper.com/t/window-alert-in-a-uxp-plugin-crashes-indesign/6647 "2023-08-08T13:26:32Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![andrea.daru](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@andrea.daru](https://forums.creativeclouddeveloper.com/u/andrea.daru)\
**Post date:** [July 10, 2024, 7:52am UTC](https://forums.creativeclouddeveloper.com/t/window-alert-in-a-uxp-plugin-crashes-indesign/6647/6 "2024-07-10T07:52:03Z")

</div>

Unfortunately it doesn’t work in **InDesign** 🥲  
I opted to use the (UXP) Dialog, even if they are not fully compatible.

I recommend using the helper library “_Adobe XD Plugin Helpers_”.  
In my case I was using InDesign 19.4 which has a bug that always places the Dialog in the lower left corner ignoring also the dimension provided.

I randomly found a solution: force the dialog dimension via css for some reason make InDesign display the Dialog in the center of the screen.

```auto
dialog {
  width: 600px !important;
  form {
    width: 100% !important;
  }
  max-height: 100px;
}

```

> **[GitHub - AdobeXD/plugin-toolkit: Helper functions and utilities for plugin...](https://github.com/AdobeXD/plugin-toolkit)**
>
> Helper functions and utilities for plugin developers

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/window-alert-in-a-uxp-plugin-crashes-indesign/6647)._
