# UXP: Photoshop's color picker intermittently cancels the modal dialog that opened it

**URL:** https://forums.creativeclouddeveloper.com/t/uxp-photoshops-color-picker-intermittently-cancels-the-modal-dialog-that-opened-it/12184
**Category:** UXP Plugin API
**Tags:** bug
**Created:** [September 21, 2026, 10:15am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshops-color-picker-intermittently-cancels-the-modal-dialog-that-opened-it/12184 "2026-09-21T10:15:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Kayrock](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kayrock/32/4748_2.png) [@Kayrock](https://forums.creativeclouddeveloper.com/u/Kayrock)
#### Post date: [September 21, 2026, 10:15am UTC](https://forums.creativeclouddeveloper.com/t/uxp-photoshops-color-picker-intermittently-cancels-the-modal-dialog-that-opened-it/12184/1 "2026-09-21T10:15:07Z")

</div>

A modal dialog (dialog.uxpShowModal) opens the color picker via batchPlay showColorPicker. On dismissal the plugin’s dialog sometimes gets a `cancel` and closes with “reasonCanceled”. About 1 in 20 picks. All dismissal routes do it: OK button, ENTER in K:/B:/b:, and Escape

The cancel lands ~50 ms AFTER batchPlay resolves, with dialog.open still true in between, so it is not the picker’s modal loop unwinding. It cannot be refused: capture-phase listener, cancelable=true, preventDefault + stopImmediatePropagation, dialog.open=false on the next tick. With the mouse there is no key event at all (document-capture keydown/keyup/keypress log nothing), so it is not a leaked keystroke. Focus state makes no difference.

Attached: minimal repro plugin (4 files, no dependencies) and two annotated logs.

[picker\_cancel\_repro.zip](https://forums.creativeclouddeveloper.com/uploads/short-url/aLCspm2KI6k757ENfNlH80POcif.zip) (5.6 KB)
