Skip to content

Commit 7886f4f

Browse files
author
Paulo Pereira
committed
Add :enabled to disableSelector
Ensures elements aren’t disabled twice.
1 parent 7317021 commit 7886f4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rails.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])',
3838

3939
// Form input elements disabled during form submission
40-
disableSelector: 'input[data-disable-with], button[data-disable-with], textarea[data-disable-with]',
40+
disableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled',
4141

4242
// Form input elements re-enabled after form submission
4343
enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled',

0 commit comments

Comments
 (0)