mirror of
https://github.com/docmost/docmost.git
synced 2026-06-10 01:52:43 +08:00
fix(base): restore position: relative on .headerCell
The sticky-headers refactor (cd8d1e0e) moved the header row's sticky
behavior up to .stickyBand and dropped the position rule from
.headerCell entirely — but the cell still has two absolutely-positioned
children that need it as their containing block:
- .resizeHandle (right: 0) — without a per-cell containing block, all
handles resolve up to .stickyBand and stack at the band's right
edge, so only one is visible.
- Popover.Target (inset: 0) — every header's popover anchor collapses
to the same band-relative box, so the property menu opens at one
fixed spot regardless of which header was clicked.
.headerCellPinned still establishes a containing block via position:
sticky, which is why the primary Title column kept working. Re-adding
position: relative on the base .headerCell fixes both the resize handle
and the property-menu popover for non-pinned columns; pinned cells are
unaffected because position: sticky later in the cascade still wins.
This commit is contained in:
@@ -118,6 +118,16 @@
|
||||
}
|
||||
|
||||
.headerCell {
|
||||
/* Containing block for absolutely-positioned children: the
|
||||
* .resizeHandle (right: 0) at the cell edge, and the Popover.Target
|
||||
* (inset: 0) used to anchor the property menu. Without this, both
|
||||
* resolve up to .stickyBand and (a) all the resize handles stack at
|
||||
* the band's right edge with only one visible, (b) every property
|
||||
* menu opens at the same band-relative spot regardless of which
|
||||
* column was clicked. .headerCellPinned overrides with position:
|
||||
* sticky which also establishes a containing block, so pinned cells
|
||||
* (e.g. the primary Title) kept working without this rule. */
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
|
||||
Reference in New Issue
Block a user