diff --git a/includes/form.inc b/includes/form.inc index 6d562e57757d8278058cf501a062bc72e9ba9289..9a28ddf73af8de39f929772b1a1fa6d3f0872c35 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -907,9 +907,14 @@ function form_builder($form_id, $form, &$form_state) { // Now that we've processed everything, we can go back to handle the funky // Internet Explorer button-click scenario. _form_builder_ie_cleanup($form, $form_state); - - // After handling the special IE case, we no longer need the buttons collection. - unset($form_state['buttons']); + + // We shoud keep the buttons array until the IE clean up function + // has recognized the submit button so the form has been marked + // as submitted. If we already know which button was submitted, + // we don't need the array. + if (!empty($form_state['submitted'])) { + unset($form_state['buttons']); + } // If some callback set #cache, we need to flip a static flag so later it // can be found.