When this module disables the button, it doesn't trigger a 'change' event afterwards. This is not helpful when using plugins like http://uniformjs.com or implementing a custom plugin that binds to see if a button has been dynamically disabled to add the appropriate class to that plugin's wrapper.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markhalliwell’s picture

Status: Active » Needs review
FileSize
963 bytes
markhalliwell’s picture

Hmm, that was a hasty patch and I didn't actually go through the rest of the code, my apologies lol

greggles’s picture

Thanks for the explanation and patches!

This makes sense to me, but I'd like to leave it here for a while in case anyone else with more Javascript experience cares to weigh in.

Also, uniform.js looks pretty cool. Thanks for pointing that out.

markhalliwell’s picture

No problem :) In all reality, I've actually moved away from using uniform.js if at all possible. I've moved onto adopting the Bootstrap method: buttons only (using CSS/3). Styling radio and select dropdowns are more headache than they're worth.

I simply just came across this issue when working on a client site. They requested this type of module/solution be used and have uniform.js in their site. However, the concept/problem is universal, an external JS library needs to be notified via a change event when this module alters the input element (which natively doesn't fire one). If no other plugins bind a change event to the element, then this really has no impact. Just a useful feature.

dxx’s picture

Issue summary: View changes

What's new about this issue?