js: consider select/textarea when setting focus on first dialog field (#68275)
This commit is contained in:
parent
dea0b0552d
commit
ba02d038f7
|
@ -250,8 +250,9 @@ var gadjo_js = gadjo_js || {};
|
|||
$content.dialog('option', 'buttons', buttons);
|
||||
|
||||
/* focus initial input field */
|
||||
if ($form.find('input:visible').length) {
|
||||
$form.find('input:visible')[0].focus();
|
||||
var $form_fields = $form.find('input:visible, textarea:visible, select:visible');
|
||||
if ($form_fields.length) {
|
||||
$form_fields[0].focus();
|
||||
}
|
||||
|
||||
/* if received content was in json, apply jQuery Form plugin on it */
|
||||
|
|
Loading…
Reference in New Issue