Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
arnis87 opened this issue Jan 8, 2024 · 9 comments · Fixed by #5705
Closed

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

arnis87 opened this issue Jan 8, 2024 · 9 comments · Fixed by #5705
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@arnis87
Copy link

arnis87 commented Jan 8, 2024

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 arnis87 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 8, 2024
@arnis87 arnis87 changed the title Replace_With_Component_Name: Brief_Bug_Description ReferenceError: rotate is not defined image.esm.js (948:0) Jan 8, 2024
@arnis87 arnis87 changed the title ReferenceError: rotate is not defined image.esm.js (948:0) Image: ReferenceError: rotate is not defined image.esm.js (948:0) Jan 8, 2024
@melloware
Copy link
Member

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

@melloware
Copy link
Member

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

@arnis87
Copy link
Author

arnis87 commented Jan 8, 2024

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

@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 8, 2024
@melloware melloware added this to the 10.3.1 milestone Jan 8, 2024
@melloware melloware self-assigned this Jan 8, 2024
melloware added a commit to melloware/primereact that referenced this issue Jan 8, 2024
@melloware
Copy link
Member

Fixed for 10.3.1!

@arnis87
Copy link
Author

arnis87 commented Jan 8, 2024

Thanks!

@melloware melloware modified the milestones: 10.3.1, 10.4.0 Jan 9, 2024
@arnis87
Copy link
Author

arnis87 commented Jan 15, 2024

@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.

@melloware
Copy link
Member

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

@melloware
Copy link
Member

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

@arnis87
Copy link
Author

arnis87 commented Jan 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants