Fix #1405 for image cutoff breaks Chrome, Brave on Mac and older Safari
ar-mac opened this issue · comments
Arkadiusz Machalica commented
Describe the bug
Fix for image being offset in some Safari versions causes issues with Chrome on Mac and older versions of Safari. Might also affect other browsers.
#1405
To Reproduce
Steps to reproduce the behavior:
- Setup the app locally. As at the time of making this Issue, the fix for Safari image cutoff have not been deployed
- Use Mac system
- Use Chrome, Brave, or older Safari version.
- Export image with 2x or 4x setting
- The image is shifted to the right 50%, or completely invisible (on x4 setting)
Expected behavior
Image should not be shifted
Screenshots
Info (please complete the following information):
- OS [e.g. macOS, Linux, Windows, iOS]: macOS 11.6 Big Sur
- Browser [e.g. Chrome, Safari, Firefox]: Chrome v114, Safari v15.0, Firefox v114, Brave v1.52.126
- Carbon URL [e.g. carbon.now.sh?bg=pink]: Currently only on localhost, as the code added in #1405 is not yet released
Suggested fixes:
- make more thorough browser check to avoid applying the shift to non affected browsers
- somehow detect if the image is shifted (by the new Safari browser) and only then apply the transform
I'll try to make a PR with a fix.