diff --git a/src/rails.js b/src/rails.js index 012d5092..dd45029c 100644 --- a/src/rails.js +++ b/src/rails.js @@ -45,7 +45,7 @@ enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled', // Form required input elements - requiredInputSelector: 'input[name][required]:not([disabled]), textarea[name][required]:not([disabled])', + requiredInputSelector: 'input[name][required]:not([disabled]), textarea[name][required]:not([disabled]), select[name][required]:not([disabled])', // Form file input elements fileInputSelector: 'input[type=file]:not([disabled])', diff --git a/test/public/test/call-remote-callbacks.js b/test/public/test/call-remote-callbacks.js index beee0a0c..6ae93215 100644 --- a/test/public/test/call-remote-callbacks.js +++ b/test/public/test/call-remote-callbacks.js @@ -110,7 +110,7 @@ asyncTest('stopping the "ajax:beforeSend" event aborts the request', 1, function }); }); -asyncTest('blank required form input field should abort request and trigger "ajax:aborted:required" event', 5, function() { +asyncTest('blank required form input field should abort request and trigger "ajax:aborted:required" event', 6, function() { $(document).bind('iframe:loading', function() { ok(false, 'form should not get submitted'); }); @@ -118,19 +118,21 @@ asyncTest('blank required form input field should abort request and trigger "aja var form = $('form[data-remote]') .append($('')) .append($('')) + .append($('')) .append($('')) + .append($('