XF 2.3 is-sticky class behaviour

BassMan

Well-known member
Hi!

In XF 2.2 the is-sticky class behaviour was working fine. Well, in XF 2.3. it is also working fine, but there is something different.

If I want to have navigation at the same distance from the top as it is when the page is loaded (when not sticky), the is-sticky class is not applied.

Example:

I added this code:
Less:
.p-navSticky {
    top: 40px;
}


In XF 2.2 the sticky navigation would be 40px from the top edge and the is-sticky class is applied like this:

SCR-20240908-lwzo.webp


In XF 2.3 with the same code, the class is not applied:

SCR-20240908-lxcp.webp


What am I doing wrong? What am I missing?

Thank you for any input.
 
Perfect, thank you, @Jeremy P!

I think the similar thing happens with u-scrollButtons js-scrollButtons is-active. If I use the u-scrollButtons js-scrollButtons elsewhere (for some other element), the is-active is not applied and page jump buttons are not displayed. This behaviour works in XF 2.2, but no longer in XF 2.3.
 
@Jeremy P

Also this, when I try to use <xf:button class="js-installPromptButton">{{ phrase('install') }}</xf:button> somewhere else, the button is not functioning. In XF 2.2. it works normally. Is this the same issue with JS?
 
I'm not sure I understand, these controls work as designed for me. Do you mean if you have duplicate controls on the same page? The handlers are designed around having a single set of controls.
 
Do you mean if you have duplicate controls on the same page? The handlers are designed around having a single set of controls.
So this has changed in XF 2.3? Because in XF 2.2 I can use same class somewhere else on the site.
 
This may have worked incidentally in 2.2 because jQuery would select multiple elements even though we had only anticipated one.
 
Back
Top Bottom