About this set
An order table where the product name and quantity cells can be edited in place, with a footer that counts changed rows and offers Discard and Save changes. Click or Tab into an editable cell and type. Enter keeps the change and Escape puts back the value the cell had when you entered it. Every changed row turns pale amber and gets a 3 pixel amber bar on its left edge until it is saved or discarded, and the footer reads 1 row changed, 2 rows changed and so on through a status region. Discard restores every cell to its last saved value and Save makes the current values the new baseline. The cells are contenteditable table cells, so no inputs are swapped in and the layout does not shift while editing. The script compares each editable cell with its saved value and toggles a data-dirty attribute on the row, and all three versions style the row from that attribute. Use it for quick corrections in admin tables, price lists and stock counts. Validate and send the values to your server in the Save handler.
What’s included
- Edit in place with contenteditable cells, no layout shift
- Enter keeps a change, Escape undoes it
- Changed rows marked with an amber tint and edge bar
- Discard restores the last saved values
- Row count announced through a status region
Accessibility
The caption explains which cells are editable and what Enter and Escape do. Editable cells are in the Tab order and draw a 2px indigo inset ring when focused. The change count is a role="status" region, and Save uses aria-disabled rather than disabled so it stays focusable and keeps focus after saving. Nothing animates.
Customise it
The dirty row colours are #fffbeb and the #f59e0b edge bar on tr[data-dirty]; the focus ring is the inset box-shadow in #4f46e5. In Bootstrap the row tint is --bs-table-bg-state, and in Tailwind it is the data-dirty: utilities on each row.




















