Issue #1263302 by andypost, peterpoe: Fixed States API disabled state handler filters...
authorwebchick
Sun, 14 Oct 2012 04:45:28 +0000 (21:45 -0700)
committerwebchick
Sun, 14 Oct 2012 04:45:28 +0000 (21:45 -0700)
misc/states.js

index 594f818..4b4f1d5 100644 (file)
@@ -482,8 +482,8 @@ $(document).bind('state:disabled', function(e) {
   if (e.trigger) {
     $(e.target)
       .attr('disabled', e.value)
-      .filter('.form-element')
-        .closest('.form-item, .form-submit, .form-wrapper').toggleClass('form-disabled', e.value);
+        .closest('.form-item, .form-submit, .form-wrapper').toggleClass('form-disabled', e.value)
+        .find('select, input, textarea').attr('disabled', e.value);
 
     // Note: WebKit nightlies don't reflect that change correctly.
     // See https://bugs.webkit.org/show_bug.cgi?id=23789