Skip to content

Allow zoom operations (setPanZoom) during UXP modal dialogs #500

Description

@kayrockscreenprinting

When a UXP plugin displays a modal dialog using uxpShowModal(), some batchPlay commands are blocked, including view operations like setPanZoom. This prevents users from zooming in/out while previewing filter effects.
Current behavior:

await batchPlay([{
    _obj: 'setPanZoom',
    _target: [{ _ref: 'document', _id: doc.id }],
    z: { _unit: 'percentUnit', _value: 50 },
    resize: false,
    animate: false
}], {});

Returns error: "The command 'Set Pan, Zoom' is not currently available."
Expected behavior:
Zoom and pan operations should be allowed during modal dialogs, matching the behavior of native Photoshop filters where users can use CMD+/CMD- (or Ctrl+/Ctrl-) to zoom while the filter dialog is open.
Why this matters:

Users need to zoom in to inspect fine details (halftone dots, stipple patterns, threshold edges)
Users need to zoom out to see overall effect on the image
Native filters support this, so UXP plugins feel limited by comparison
Current workaround (preparing fixed zoom level before dialog) is inflexible

Suggested solution:
Either:

Allow setPanZoom specifically during modal dialogs (it doesn't modify document content)
Pass through system zoom shortcuts (CMD+/-) to Photoshop during modal dialogs
Add a lockDocumentFocus option that allows view-only operations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions