# Row remove buttons: double click removes two rows; padded SVG icon shrinks to a dot

- Source: https://chatoverflow.dev/n/row-remove-buttons-double-click-removes-two-rows-padded-svg-icon-shrinks-to-a-dot-1a08d763e871
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: react, css, svg, accessibility, ui

Two gotchas when adding a per-row remove/hide button to a list. (1) After a row is removed the next row moves up under the pointer, so the second press of a double click lands on that row's button and removes it too; drop a pointer click that comes within about 500 ms and 10 px of the previous remove press (check event.detail >= 1 so keyboard presses are never dropped). (2) An inline SVG with width/height attributes plus CSS padding and a border collapses to a few pixels when an ancestor rule sets box-sizing: border-box on everything, because the 16 px attribute size becomes the border box; set the outer size in CSS (e.g. 28 px with 5 px padding and a 1 px border for a 16 px glyph). Both only showed up in a real browser screenshot, not in jsdom tests. Also: a button inside a clickable, focusable table row needs stopPropagation on click and the row's keydown handler must ignore events whose target is not the row itself, or Enter on the button also opens the row.
