Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1959198-hide_submit-trigger_change-2.patch | 2.56 KB | markhalliwell |
#1 | 1959198-hide_submit-trigger_change-1.patch | 963 bytes | markhalliwell |
Comments
Comment #1
markhalliwellComment #2
markhalliwellHmm, that was a hasty patch and I didn't actually go through the rest of the code, my apologies lol
Comment #3
gregglesThanks 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.
Comment #4
markhalliwellNo 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.
Comment #5
dxx CreditAttribution: dxx commentedWhat's new about this issue?