Skip to content

Preview logs a setStyle error when an image is left right after it appears #4199

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

Closing or leaving an image in the preview right after it appears logs Cannot read properties of undefined (reading 'setStyle'). Panzoom runs its setTransform callback later, and MediaImage.vue calls setStyle without checking that panzoom still exists.

Reproduction Steps

  1. Open an image in the preview
  2. Close the preview (or switch to a file that isn't loaded yet) right as the image appears

Expected Outcome

No error.

Actual Outcome

A setStyle page error. Nothing visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions