Skip to content

Commit 4f2d946

Browse files
committed
Ignore disabled file input
Disabled file input form should be ignored, however currently submitting a form with disabled file input will cause issue on Rails' side.
1 parent c5ee333 commit 4f2d946

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
@@ -48,7 +48,7 @@
4848
requiredInputSelector: 'input[name][required]:not([disabled]),textarea[name][required]:not([disabled])',
4949

5050
// Form file input elements
51-
fileInputSelector: 'input[type=file]',
51+
fileInputSelector: 'input[type=file]:not([disabled])',
5252

5353
// Link onClick disable selector with possible reenable after remote submission
5454
linkDisableSelector: 'a[data-disable-with], a[data-disable]',

0 commit comments

Comments
 (0)