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.
After clicking on a submit button which uses ajax, the button behaves like it has been set a float attribute (see screenshots). When submission is finished, it returns to normal.
The code i use is taken from the AJAX example "Add-more button (with graceful degradation)"
$form['names_fieldset']['remove_name'] = array(
'#type' => 'submit',
'#value' => t('Remove one'),
'#submit' => array('ajax_example_add_more_remove_one'),
'#ajax' => array(
'callback' => 'ajax_example_add_more_callback',
'wrapper' => 'names-fieldset-wrapper',
),
);
Thanks in advance
Comment | File | Size | Author |
---|---|---|---|
#12 | 1280674-ajax.patch | 943 bytes | andypost |
#11 | 1280674-ajax.patch | 546 bytes | andypost |
#6 | throbber_0.patch | 726 bytes | TR |
submitted.png | 5.81 KB | magdulka | |
normal.png | 6.62 KB | magdulka |
Comments
Comment #1
rfayYes, that's been a bug from day one. I studied it one time and decided it was a theme issue, but I agree it should be fixed.
Comment #2
TR CreditAttribution: TR commentedTry this. I've been using it successfully for about three months - it seems to solve this problem everywhere it occurs. Credit for the patch goes to Damien Tournoud.
Comment #3
magdulka CreditAttribution: magdulka commentedThanks, it works!
Comment #4
rfayOK, let's get this fixed!
Comment #5
rfayWill need a reroll after the core patch went in.
Comment #6
TR CreditAttribution: TR commentedRerolled for core changes.
Comment #7
pflame CreditAttribution: pflame commentedThe patch from #6 works great, I checked with all the examples from ajax example modules. It works.
Comment #8
rfayI really appreciate TR and DamZ actually finally documenting the fix to this long, longstanding patch.
Here's a quick screencast that shows what happens so everybody can understand it. Sorry about the horrible audio, but it's just demonstrating a bug :-)
RTBC.
Comment #9
Dries CreditAttribution: Dries commentedCommitted to 7.x and 8.x. Thanks.
Comment #10
andypostsystem.base-rtl.css should be fixed too!
EDIT: It seems this patch does not tested against RTL at all. And should be rolled back.
Comment #11
andypostI think this enough
Comment #12
andypost.message is LTR
Comment #13
nagiek CreditAttribution: nagiek commentedI'm grateful for this patch! Really improves usability.
Thanks.
Comment #14
aspilicious CreditAttribution: aspilicious commentedI think you can remove this as it is the same code now as in the RTL css file
Best practice to reset padding-left to 0.
18 days to next Drupal core point release.
Comment #15
TNmoxa CreditAttribution: TNmoxa commentedDoesn't work for check boxes
Comment #16
TR CreditAttribution: TR commented@TNmoxa: Can you give a specific example of a core Drupal page or a contributed module page where this doesn't work for checkboxes? "Doesn't work" isn't much help unless you can give steps for us to reproduce the error you're seeing. Likewise, are you testing this on an LTR or RTL site? The LTR patch is already committed to 7.x and 8.x, the only thing under consideration now is how the RTL patch should look.
Comment #17
nod_dup there is a newer issue to use classes for the ajax throbber, fixing this bug.
Comment #18
rfay@nod_, please don't mark something as a dup without saying what it's a duplicate of. Could you please provide that here?
Thanks!
Comment #19
nod_yeah sorry tried to find it without luck, more awake now: here it is #1847916: Replace the ajax-progress-throbber div with a class.