Skip to content

Commit a48f0b4

Browse files
committed
Ignore Rails button_to forms in clickable rows
Prevent row click navigation from hijacking `button_to` actions while still allowing regular forms inside a row to behave normally.
1 parent a124479 commit a48f0b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/javascript/controllers/admin/table_row_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default class extends Controller {
1212
const isLink = event.target.closest("a")
1313
if (isLink) return
1414

15-
const isButton = event.target.closest("button, form")
15+
const isButton = event.target.closest("button, form.button_to")
1616
if (isButton) return
1717

1818
const isCheckbox = event.target.closest("input[type='checkbox']")

0 commit comments

Comments
 (0)