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

URGENT - Image wrongly sized on Safari #49

Open
onevcard-team opened this issue Dec 7, 2023 · 7 comments
Open

URGENT - Image wrongly sized on Safari #49

onevcard-team opened this issue Dec 7, 2023 · 7 comments

Comments

@onevcard-team
Copy link

Hello,

we have a image that is wrongly sized on safari. Can be reproduced on the code sandbox with this image:
oneVcard_F_Logo_#51DDAA_transparent

https://codesandbox.io/p/sandbox/react-advanced-cropper-kkvbz?file=%2Fsrc%2Fstyles.scss%3A1%2C1

on chrome it works and the image is resized correctly:

image

image

on safari it looks like this:

image
image

@onevcard-team
Copy link
Author

Using version 0.19.4

@Norserium
Copy link
Collaborator

@oneVcard, it happens only with this current image? Could you send it in an archive?

@onevcard-team
Copy link
Author

onevcard-team commented Dec 14, 2023

@oneVcard, it happens only with this current image? Could you send it in an archive?
logo.zip

we have some other images where it happens but i cannot provide those as they are from our customers

@onevcard-team
Copy link
Author

@Norserium any update on this?

@onevcard-team
Copy link
Author

@Norserium

@Norserium
Copy link
Collaborator

Norserium commented Jan 20, 2024

@oneVcard, by the way, this issue is reproducing in other croppers. Try it yourself.

What I've investigated:

  1. This issue is specific for SVG images in Safari browser.
  2. It happens when we use as the source an resized image, in this case the image will incorrectly drew at a canvas.

I can offer you the workaround, that resolves this bug, but in some cases it may decrease the performance and leads to the appearing of the redundant image loading request.

I'm not sure that this solution can become official due to this circumstances, but perhaps it can be useful in your usecase.

@onevcard-team
Copy link
Author

@Norserium

oh okay, thank you for analysing this and providing a workaround even tho it is not an issue from your component. Very much appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants