- Issue created by @jmouse888
- Assigned to shubham_jain
- 🇺🇸United States jmouse888
I'd like to clarify something. When using intersectionObserver, it's recommended to use
rootBounds
. However, we face a problem with the sticky header <table> tag as it exists within the actual <table> tag and is positioned absolutely at thestickyOffsetTop
. This causes therootBounds.top
of the actual table to always be at thestickyOffsetTop
position when the table is outside of the bottom of the viewport, triggering the display.When using
intersectionRect
for the real table, only the visible area of the table is considered, which does not include the hidden sticky header <table>.Alternatively, instead of changing to
intersectionRect
, we can move the sticky header <table> outside of the main <table> tag in HTML. I don't know if this is done by Gin or Claro. I believe most other themes do that, but the pros and cons of doing so is another debate for another day. - 🇺🇸United States jmouse888
Generated a patch to change the
rootBounds
tointersectionRect
. I don't know how to do a merge request or even be able to. Someone test this please. Make sure to clear the browser's cache as well as the Drupal cache. - 🇮🇳India shubham_jain
Hi everyone, I tried the patch in the comment #5 but it didn't resolve the issue. Attaching the screenshot for reference.
- 🇺🇸United States jmouse888
#6, Can you put a watch on "e" and see what value it has when the header is visible? Or when you scroll up and down? thx.
- Status changed to Needs review
over 1 year ago 1:30pm 13 September 2023 -
saschaeggi →
committed 3c74d46d on 8.x-3.x
Issue #3386007 by jmouse888: Table sticky header appears when table not...
-
saschaeggi →
committed 3c74d46d on 8.x-3.x
- Status changed to Fixed
over 1 year ago 10:10am 17 September 2023 - 🇨🇭Switzerland saschaeggi Zurich
Thanks @jmouse888
Verified on 10.1.3 on a views edit page with a sticky table.
Automatically closed - issue fixed for 2 weeks with no activity.