Skip to content

Commit e6436dd

Browse files
committed
fix(plugin-detail): a press on a related panel header's free space opens the list
The console scales a pressed button (`button:active { transform: scale(0.96) }`). A transformed button is the containing block of its own absolute ::after, so mid-press the stretched hit area shrank back to the title and chip, the release landed on the header row, and the click went nowhere. The open button now carries `transform: none`, so the row stays the target for the whole press. Found by the proxy preview review on 8b20d10. Claude-Session: https://claude.ai/code/session_01Utp6CaA9ZdTcj97mzGtHYt Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8b20d10 commit e6436dd

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎ui/packages/plugin-detail/src/RelatedList.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2864,9 +2864,14 @@ export const RelatedList: React.FC<RelatedListProps> = ({
28642864
// The row is the target: the button's ::after stretches over the
28652865
// whole header, so a click on its free space opens the list too,
28662866
// and the row stays one control. The controls sit above it.
2867+
// `transform: none` keeps the console's pressed-button scale off
2868+
// it: a transform makes the button the containing block of its own
2869+
// ::after, which shrinks to the button mid-press, so the release
2870+
// lands on the header and the click never reaches the button.
28672871
<button
28682872
type="button"
28692873
className="flex min-w-0 cursor-pointer items-center gap-1.5 rounded-sm text-left after:absolute after:inset-0 after:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
2874+
style={{ transform: 'none' }}
28702875
title={viewAll}
28712876
data-related-panel-open=""
28722877
onClick={() => open()}

‎ui/packages/plugin-detail/src/__tests__/RelatedPanel.header-27524.test.tsx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ describe('the related panel header (objectstack#27524, Target 1)', () => {
105105
const controls = head().querySelector('[data-related-panel-controls]') as HTMLElement;
106106
expect(controls.className).toMatch(/\brelative\b/);
107107
expect(controls.className).toContain('z-10');
108+
// No transform on the button, ever: the console scales a pressed button
109+
// (`button:active { transform: scale(0.96) }`), and a transformed button
110+
// is the containing block of its own ::after, which then shrinks to the
111+
// button mid-press, so a press on the row's free space released on the
112+
// header and opened nothing (proxy preview review, PR #27920). jsdom has
113+
// no :active or layout, so the pin is the inline override itself.
114+
expect(open.style.transform).toBe('none');
108115
});
109116

110117
it('⠿ + ⋯ sit at the right end, shown on hover or focus; their clicks do not open the list', async () => {

0 commit comments

Comments
 (0)