primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Image: ReferenceError: rotate is not defined image.esm.js (948:0)

Open arnis87 opened this issue 2 years ago • 9 comments

Describe the bug

Upgraded to latest version: 10.3.0 and when started getting this after closing zoomed image:

Unhandled Runtime Error
ReferenceError: rotate is not defined

Call Stack
onMaskClick
node_modules\primereact\image\image.esm.js (948:0)

#5628 was only fix related to Images component so perhaps this is the cause.

Reproducer

https://codesandbox.io/p/sandbox/pedantic-lalande-m8cyqx

PrimeReact version

10.3.0

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

Open click on <Image> component to zoom and then close it. Error occurs immediately when closing zoom view.

Expected behavior

No error.

arnis87 avatar Jan 08 '24 17:01 arnis87

Hmmm your reproducer is working for me I am not getting any error?

melloware avatar Jan 08 '24 17:01 melloware

Nevermind I had to click the background to make it happen.

melloware avatar Jan 08 '24 17:01 melloware

Yes, seems to work fine when when closing with escape, only when clicking on the mask/overlay.

arnis87 avatar Jan 08 '24 17:01 arnis87

Fixed for 10.3.1!

melloware avatar Jan 08 '24 17:01 melloware

Thanks!

arnis87 avatar Jan 08 '24 18:01 arnis87

@melloware Still some issue regarding this one. It no longer shows error but when you open same image again it will be extremely zoomed out. If controls are allowed and you zoom in to the blank screen the image becomes visible.

arnis87 avatar Jan 15 '24 13:01 arnis87

@arnis87 can you provide a StackBlitz reproducer? I can't reproduce: https://stackblitz.com/edit/qdr2sm?file=src%2FApp.jsx

melloware avatar Jan 15 '24 13:01 melloware

OK yeah I see it. Please open a new ticket.

melloware avatar Jan 15 '24 14:01 melloware

I was able to reproduce it in the original: https://codesandbox.io/p/sandbox/pedantic-lalande-m8cyqx

arnis87 avatar Jan 15 '24 14:01 arnis87