diff --git a/.changeset/hot-socks-cross.md b/.changeset/hot-socks-cross.md new file mode 100644 index 0000000000..5eca29e058 --- /dev/null +++ b/.changeset/hot-socks-cross.md @@ -0,0 +1,7 @@ +--- +'@backstage/ui': patch +--- + +Fixed Table with row selection creating phantom scroll height on ancestor elements by establishing a containing block for visually-hidden checkbox inputs. + +**Affected components:** Table, TableRoot diff --git a/packages/ui/src/components/Table/Table.module.css b/packages/ui/src/components/Table/Table.module.css index 969d27b805..0331b6c350 100644 --- a/packages/ui/src/components/Table/Table.module.css +++ b/packages/ui/src/components/Table/Table.module.css @@ -31,6 +31,8 @@ } .bui-Table { + /* Establishes containing block for react-aria's absolutely positioned hidden checkbox inputs, preventing them from escaping to a distant ancestor and creating phantom scroll height. */ + position: relative; width: 100%; caption-side: bottom; border-collapse: collapse;