Project

General

Profile

Patch #43641 » 0004-Stabilize-sticky-issue-header-visibility.patch

Mizuki ISHIKAWA, 2026-04-14 02:50

View differences:

app/assets/stylesheets/application.css
top: 0;
z-index: 1;
}
table.list.sticky {
position: absolute;
inset: 0 auto auto 0;
inline-size: 0;
block-size: 0;
margin: 0;
border: 0;
overflow: visible;
}
table.list th, .table-list-header { background-color: var(--oc-gray-2); padding: 4px; white-space: nowrap; font-weight: bold; border-block-end: 2px solid var(--oc-gray-4); }
table.list th.whitespace-normal {white-space: normal;}
table.list td {text-align: center; vertical-align: middle; padding-block: 3px; padding-inline-end: 10px; border-block-start: 1px solid var(--oc-gray-4);}
app/javascript/controllers/sticky_table_header_controller.js
}
get isHeadIntersecting() {
return this.headTarget.getBoundingClientRect().top > this.stickyTopOffset
const headRect = this.headTarget.getBoundingClientRect();
return headRect.bottom > this.stickyTopOffset
}
get isTableIntersecting() {
......
get stickyTopOffset() {
this.prepare()
const top = window.getComputedStyle(this.stickyHeader).top
const style = window.getComputedStyle(this.stickyHeader)
const top = style.getPropertyValue('inset-block-start') || style.top
return top === "auto" ? 0 : parseFloat(top)
}
}
(8-8/8)