Window jumps before it is centred

Home Forums Easy FancyBox Pro Window jumps before it is centred

This topic contains 9 replies, has 3 voices, and was last updated by  Kristijan Marin 7 months, 3 weeks ago.

  • Author
    Posts
  • #7471

    Kristijan Marin
    Participant

    Hi,

    I use Easy Fancybox to show Contact Form 7 and the one thing I don’t want is when I click the button and the window becomes visible it somehow jumps down and then up in the centre …

    I tried to disable the transitions,scrolling etc … but I still can’t stop it

    How can I disable this ? I just want the window to appear in the centre without moving …

    Thank you.
    Kris

  • #7472

    Pharéo
    Participant

    Hi Kris, it sounds like a conflict with your theme. Often, such conflicts occur with another script related to smooth scrolling. Can you share a link to your site? Maybe I can find a fix or work-around…

  • #7473

    Kristijan Marin
    Participant

    Hi,

    Yes …. http://www.pro-focus.si/sl/domov/

    just scroll down and there is on grey button “DA …”

    Thank you.

  • #7474

    Pharéo
    Participant

    Thanks, yes there is smooth scrolling going on there.

    Have you tried deactivating the option “Center on Scroll” ?

  • #7475

    Kristijan Marin
    Participant

    Hi,

    Yes … “Behavior -> Center while scrolling” and “Scrolling Define scrolling and scrollbar visibility.”

    are both off now …. now the window doesn’t scroll up but it still scrolls down …

  • #7490

    Kristijan Marin
    Participant

    any hint how to fix this ?

  • #7493

    RavanH
    Keymaster

    Hi Kirstijan, I can confirm the scroll down after oopening is also there on mobile device screen so it appears to be unrelated to the fixed menu.

    Sadly I do not see a quick fix either but I’ll try to find out more on large screen when back in the office tomorrow morning.

  • #7494

    Kristijan Marin
    Participant

    Hi Ravan,

    Maybe but just maybe I’m a little closer to the cause of a problem …..

    I think that the problem is that when I put “#” as a first character inside HREF of a button,

    that the “page” thinks this is an anchor and tries to navigate ….

    Because if I don’t use Fancybox on it, and the button has “#” , then the page jumps to the top

    What do you think ?

    Thank you.
    Kris

  • #7504

    RavanH
    Keymaster

    that the “page” thinks this is an anchor and tries to navigate ….

    Indeed, that is the smooth scrolling script mentioned earlier. Turns out it’s inside the theme script x-body.js … the part is called Scrollspy and in particular the modified part of it that differs from the standard Bootstrap Scrollspy script.

    The way the modification is constructed makes it impossible (as far as I can tell) to disable the effect for particular links but… there is ONE exception: scroll animation is disabled for links with target “#comments”. Or a target that start with #comments.

    This might give us a handle to work around the theme’s scroll effect.

    Rename the button href from #popupform_div to #commentsform_div (or anything else as long as it starts with #comments) and then adapt both the form div ID and the popupform_div style rules that are in the child theme style.css

    Hope I explained that clear enough. If not just let me know 🙂

  • #7505

    Kristijan Marin
    Participant

    Hi,

    Thank you … yes this did the trick 🙂

    Works great now.

    Best regards,
    Kris

You must be logged in to reply to this topic.