The problem is if i submit form in Chromium browser, i ALWAYS get first button of the form as triggering_element no matter what button i clicked.
How to repeat? Most likely just install Drupal 7.12, and try submit some form(s), i tested in on node/add form (both admin/frontend theme, and various forms, not just one). In Firefox if you click on (second button) "Save and continue", this button should be marked as triggering_element, however if you want to do the same in Chromium the triggering_element is set to first button. The "problematic" part of the code follow (includes/form.inc line 1849)
// If a form contains a single textfield, and the ENTER key is pressed
// within it, Internet Explorer submits the form with no POST data
// identifying any submit button. Other browsers submit POST data as though
// the user clicked the first button. Therefore, to be as consistent as we
// can be across browsers, if no 'triggering_element' has been identified
// yet, default it to the first button.
if (!$form_state['programmed'] && !isset($form_state['triggering_element']) && !empty($form_state['buttons'])) {
$form_state['triggering_element'] = $form_state['buttons'][0];
}
Expected behaviour? Well it should work in all browsers the same, but i understand it may not be simple at all.
Informations about Chromium version: 16.0.912.77 (Developer Build 118311 Linux) Ubuntu 11.10
Could somebody please check if this issue is properly reported, and also i will appreciate if somebody could test it and cofirm the issue, so we can narrow down the problem. If this is somehow known issue, please close this issue or mark it as duplicate, but i didn't find exactly same or similar issue in the tracker. Thanks in advance.
Comments
Comment #1
morf2009 commentedI'm sorry this was theme related bug.