Because it only adds itself to elements with .form-item or .form-wrapper classes. But submit uses .form-submit.

The patch adds .form-submit to that list... An alternative solution would be to add form-item to submit buttons too...

CommentFileSizeAuthor
states_for_submit.patch1.23 KBBerdir
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay’s picture

subscribe

rfay’s picture

rfay’s picture

Wow, have to look where I'm typing.

@berdir, didn't you mention that select elements were affected as well?

rfay’s picture

Component: javascript » forms system
Status: Needs review » Reviewed & tested by the community

This looks good to me.

#990460-1: Demonstrate submit button being hidden in #states example provides a patch to the #states example to demonstrate it.

Simple fix, I don't anticipate any side-effects.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.