Fixed issue #2818 - TimeAccounting modal dialog input not focused.
This commit is contained in:
parent
9478c49fcd
commit
2beb1b4506
1 changed files with 11 additions and 1 deletions
|
@ -618,7 +618,17 @@ class App.ControllerModal extends App.Controller
|
|||
|
||||
onShown: (e) =>
|
||||
if @autoFocusOnFirstInput
|
||||
@$('.form-group').first().find('input:not([disabled]):not([type="hidden"]):not(".btn"), select:not([disabled]), textarea:not([disabled])').first().focus()
|
||||
|
||||
# select generated form
|
||||
form = @$('.form-group').first()
|
||||
|
||||
# if not exists, use whole @el
|
||||
if !form.get(0)
|
||||
form = @el
|
||||
|
||||
# focus first input, select or textarea
|
||||
form.find('input:not([disabled]):not([type="hidden"]):not(".btn"), select:not([disabled]), textarea:not([disabled])').first().focus()
|
||||
|
||||
@initalFormParams = @formParams()
|
||||
|
||||
localOnClose: (e) =>
|
||||
|
|
Loading…
Reference in a new issue