• Resolved acekin

    (@acekin)


    I am writing to report an unexpected behavior. I have checked the box next to “Center while scrolling” and in general it works. However, in a recent post I have two NextGEN galleries and the images from the first gallery, as well ass the single images in the body, scroll up or down with the page scroll whereas the images from the second gallery center the images if the page is scrolled. Take a look at the two galleries on the following link:

    http://www.keptlight.com/irving-penn-at-lesley-university/

    Cemal

    • This topic was modified 9 years, 5 months ago by acekin.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter acekin

    (@acekin)

    It is actually more intriguing than I thought. The fully landscape oriented images center, but those either portrait oriented or close to a square do not center. This seems to happen in all the galleries, my observation in the original post came from the fact that the first gallery mostly contained square or close to that images. So, you can observe this behavior in other galleries as well, like A Stroll in Providence.

    Cemal

    Very strange… I do not see the relationship with portrait or landscape photos. With both types the center on scroll sometimes works and other times not. I see no errors so I don’t have a clue about why the center on scroll is sometimes failing.

    Did you test without (or bypassing) CloudFlare?

    Thread Starter acekin

    (@acekin)

    It is behaving better today, which is also strange! I have a replica site at:

    http://www.testbeds.info

    which is not behind CloudFlare. I observed the same behavior on that site as well when I first reported the behavior and I did test with FireFox and MS Edge browsers. Now, all seem to be working fine! I will consider this “magically resolved” and unless I observe the same behavior I will not bother you with the same question. Thank you,

    Cemal

    Just checked http://www.testbeds.info/portfolios/kirlangic/ in Chrome and the center on scroll was not working no matter which image orientation… Then I refreshed the page and tested a few times and finally after the third refresh it worked fine for all images. Then I refreshed again a several times, testing each time, and it never failed again.

    Very weird.

    Did you test deactivating all other plugins (except NextGen maybe) or switching to the default theme?

    Or disable all light box script related options in NextGen…

    Thread Starter acekin

    (@acekin)

    For some reason (magic) everything is working fine in all the browsers I have tried. I will keep an eye on it and report it back to you if I see something strange. By the way, this will not be a problem for most viewers; I wanted you to know it in case it affected some other things more than bothering me.

    Cemal

    Thank you very much for your report. Your feedback is highly appreciated!

    I have not heard this issue before but if anyone else encounters the same, or if it mysteriously comes back on your site, I hope to be able to learn more…

    Thread Starter acekin

    (@acekin)

    I am back with more information for you. It still happens on my Microsoft Surface Book laptop, I can make it happen on demand and fix it too! Here are my observations and speculations. Take them for whatever they may be worth:

    1. The screen has 2000×3000 pixel resolution
    2. In order to see things on a relatively small screen everything is enlarged 200%
    3. When the displayed image height is close to or the same as the screen height the centering does not work. Most of my images are 1,000 pixels on the long edge.
    4. When a portrait oriented image is displayed its height is fairly close to the display port, 1,000 pixels and the image scrolls with the page
    5. If I zoom out in the browser by pressing Ctrl – this relationship changes and centering on scroll starts working as the displayed image becomes smaller
    6. Alternately, if I view an old gallery where the image height is less than 1,000 pixels center on scroll also works
    7. I am not sure how important or significant it is, but this is the full scoop of under what conditions center on scroll does not work. The rest is up to you

    If you have a similar screen you can test these out. It probably does not matter to most users, but you may have reasons to look into it, like curiosity!

    Take care,

    Cemal

    Thank you, that’s very helpful. Will be testing further and let you know if I find anything that can be done to prevent it 🙂

    An observation: each time I test your home page center on scroll is not working while on other (portfolio) pages it sometimes works and sometimes not. Is there something on your homepage that is different from other pages? Does it use a special theme template?

    Could you test two theories for me?

    1. Try removing the style rule

    
    #fancybox-content {
        border: 3px solid #788 !important;
    }
    

    that you added to the theme custom styles. It makes the light box frame larger than the script expects by adding a border. You can set the border color #788 and its width to 3px on Settings > Media in the Window section under Appearance and Dimensions.

    2. If that does not change things, could you then test disabling WordFence for a moment. It appears to be doing something on mousescroll which might interfere with the fancybox script operations…

    Thread Starter acekin

    (@acekin)

    You are right, removing that rule fixes it. And, I can see how it throws the calculations off. I added those parameters in the settings and all is fine now.

    You mentioned that you had this problem on my home page but there should be nothing to view with Easy Fancy Box, it has a series of featured posts and links. Maybe you are referring to one of the recent posts. But the style rule I added to increase the border width was the culprit. You can view any image and they all center on scroll.

    Thank you,

    Cemal

    • This reply was modified 9 years, 5 months ago by acekin.

    Sorry, I meant the page from your first link http://www.keptlight.com/irving-penn-at-lesley-university/ (not the homepage) … it’s working there fine now too so it’s all good now 🙂

    Thanks for your cooperation and feedback !

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Unexpected “Center while scrolling” behavior’ is closed to new replies.