Patch #43641 » 0004-Stabilize-sticky-issue-header-visibility.patch
| app/assets/stylesheets/application.css | ||
|---|---|---|
| 421 | 421 |
top: 0; |
| 422 | 422 |
z-index: 1; |
| 423 | 423 |
} |
| 424 |
table.list.sticky {
|
|
| 425 |
position: absolute; |
|
| 426 |
inset: 0 auto auto 0; |
|
| 427 |
inline-size: 0; |
|
| 428 |
block-size: 0; |
|
| 429 |
margin: 0; |
|
| 430 |
border: 0; |
|
| 431 |
overflow: visible; |
|
| 432 |
} |
|
| 424 | 433 |
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); }
|
| 425 | 434 |
table.list th.whitespace-normal {white-space: normal;}
|
| 426 | 435 |
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 | ||
|---|---|---|
| 98 | 98 |
} |
| 99 | 99 | |
| 100 | 100 |
get isHeadIntersecting() {
|
| 101 |
return this.headTarget.getBoundingClientRect().top > this.stickyTopOffset |
|
| 101 |
const headRect = this.headTarget.getBoundingClientRect(); |
|
| 102 | ||
| 103 |
return headRect.bottom > this.stickyTopOffset |
|
| 102 | 104 |
} |
| 103 | 105 | |
| 104 | 106 |
get isTableIntersecting() {
|
| ... | ... | |
| 118 | 120 |
get stickyTopOffset() {
|
| 119 | 121 |
this.prepare() |
| 120 | 122 | |
| 121 |
const top = window.getComputedStyle(this.stickyHeader).top |
|
| 123 |
const style = window.getComputedStyle(this.stickyHeader) |
|
| 124 |
const top = style.getPropertyValue('inset-block-start') || style.top
|
|
| 122 | 125 |
return top === "auto" ? 0 : parseFloat(top) |
| 123 | 126 |
} |
| 124 | 127 |
} |
- « Previous
- 1
- …
- 6
- 7
- 8
- Next »