› Forums › Easy FancyBox Pro › Window jumps before it is centred
- This topic has 9 replies, 3 voices, and was last updated 6 years, 6 months ago by
Kristijan Marin.
-
AuthorPosts
-
-
1 December 2016 at 21:42 #7471
Kristijan Marin
ParticipantHi,
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 -
1 December 2016 at 21:53 #7472
Pharéo
KeymasterHi 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…
-
1 December 2016 at 21:57 #7473
Kristijan Marin
ParticipantHi,
Yes …. http://www.pro-focus.si/sl/domov/
just scroll down and there is on grey button “DA …”
Thank you.
-
1 December 2016 at 22:52 #7474
Pharéo
KeymasterThanks, yes there is smooth scrolling going on there.
Have you tried deactivating the option “Center on Scroll” ?
-
1 December 2016 at 22:59 #7475
Kristijan Marin
ParticipantHi,
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 …
-
3 December 2016 at 10:36 #7490
Kristijan Marin
Participantany hint how to fix this ?
-
4 December 2016 at 13:18 #7493
Rolf
KeymasterHi 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.
-
4 December 2016 at 13:32 #7494
Kristijan Marin
ParticipantHi 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 -
5 December 2016 at 10:53 #7504
Rolf
Keymasterthat 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 🙂
-
5 December 2016 at 11:12 #7505
Kristijan Marin
ParticipantHi,
Thank you … yes this did the trick 🙂
Works great now.
Best regards,
Kris
-
-
AuthorPosts
- You must be logged in to reply to this topic.