Semantic-Org / Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.
http://www.semantic-ui.com
MIT License
51.09k stars 4.95k forks source link

[Sticky] - Sticky applies bound bottom #7012

Open martintali opened 3 years ago

martintali commented 3 years ago

Steps to Reproduce

  1. Open page with an element with class ui sticky
  2. Scroll down
  3. bound bottom classes are applied instead of fixed top

Expected Sticky element should have fixed top always

Result Sticky element has bound bottom class applied

ahmb commented 3 years ago

Im seeing this too

ljacobs-fb commented 3 years ago

Also experiencing this. Oddly, on production, it goes away when I open developer console. In local, that did not happen and I was also able to see the "ui sticky bound bottom" classes were in fact causing this annoying issue I'm debugging where the elements are jumping from top of the context selector to the bottom of it..

Edit: Could have been how I was refreshing cached sticky items after deleting/repopulating the dom with new elements. I had it set to only refresh some sticky elements within a certain segment..

$('#the_segment_id .ui.sticky:visible').sticky('refresh');

But using this instead seems to resolve my particular problem:

$('.ui.sticky:visible').sticky('refresh');

AmChaoSun commented 2 years ago

I got this issue and finally fixed by setting the correct context property in the .