diff --git a/app/assets/javascripts/app/controllers/_application_controller.coffee b/app/assets/javascripts/app/controllers/_application_controller.coffee index f973d0e79..8c5b09f6e 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.coffee @@ -793,8 +793,8 @@ class App.ControllerModal extends App.Controller onShow: -> # do nothing - onShown: -> - # do nothing + onShown: => + @$('input:not([disabled]):not([type="hidden"]):not(".btn"), textarea').first().focus() onClose: -> # do nothing diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/time_accounting.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/time_accounting.coffee index 87f1307bb..8c4c01546 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/time_accounting.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/time_accounting.coffee @@ -20,9 +20,6 @@ class App.TicketZoomTimeAccounting extends App.ControllerModal content: -> App.view('ticket_zoom/time_accounting')() - onShown: => - @$('[name="time_unit"]').focus() - skip: (e) => return if !@submitCallback @submitCallback({})