-
Notifications
You must be signed in to change notification settings - Fork 166
Blurry zoomed image on Safari #193
Comments
We've been having the exact same issue. I can think of two solutions:
I have tried my hand at the second solution, but it would take such a significant amount of work, that it might as well be a complete rewrite. |
My workaround for this Safari bug now looks like this:
$('.my-gallery a')
.on('openstart.fluidbox', function() {
$(document.body).addClass('fluidbox-image-opened');
})
.on('closestart.fluidbox', function() {
$(document.body).removeClass('fluidbox-image-opened');
})
.fluidbox();
body.fluidbox-image-opened .every-element-which-has-position-fixed {
visibility: hidden;
} |
@czirkoszoltan great workaround! I'd add that if you use a fixed element, you should also add |
I still have this problem |
this is a Safari bug, unfortunately |
None of the fixes described here work for me, my only solution has been to disable FluidBox on Safari entirely. |
I tried the @czirkoszoltan js+css fix, unfortunately it didn't work for me. |
@neokio Did you hide all elements in the DOM with position:fixed? I mean, really all, not just the containers of the fluidbox instance, but any other element as well. |
I used every fixed element in my CSS ... there were 6 in total. But I'm using a pretty large CSS framework (fomantic-ui) that probably added some I didn't check. I'll try again :) |
Do you need to set <div id="parent" style="position: fixed">
Blah
<div id="child" style="position: fixed">Blah</div>
</div> ... Will EDIT: Turns out I don't have any of these anyways. The script is working, I can see (in Chrome) as the class is added to and removed from Maybe |
Is there any update for this?
Has it already been reported to the Safari team? |
This is a Safari-only issue.
Sometimes the zoomed image (.fluidbox__ghost) is blurry, because Safari scales it twice. Normally, the div has two style properties, which affect scaling; the first one is the width: and height: property (which is there for the unopened image), and the second one is the transform: property (only for the opened image). Usually the original size of the image is much smaller than the zoomed one. But Safari seems to resample image twice, first for the width and height first, and then again for the transform, under certain circumstances. The result is a blurred image:
The circumsances seem to be as follows:
AND
If either of the conditions is not met, the image is rendered correctly, even though the width, height and the transform properties generated by fluidbox are the same:
This is a test file: test-case.txt. You can comment out the yellow and green paragraph (or modify their style) to see how it affects the output.
This is clearly a bug of Safari, and I don't know whether it can be worked around somehow. Feel free to close the bug, as this is not caused by Fluidbox. I used iOS 9.3.5 on an iPhone 4.
The text was updated successfully, but these errors were encountered: