diff --git a/resources/views/tasks/edit.blade.php b/resources/views/tasks/edit.blade.php index 388dddae8d41..80c21bb1403f 100644 --- a/resources/views/tasks/edit.blade.php +++ b/resources/views/tasks/edit.blade.php @@ -443,12 +443,6 @@ ko.applyBindings(model); $(function() { - @if (!$task && !$clientPublicId) - $('.client-select input.form-control').focus(); - @else - $('#description').focus(); - @endif - $('input[type=radio]').change(function(event) { var val = $(event.target).val(); if (val == 'timer') { @@ -595,6 +589,12 @@ } else { $clientSelect.trigger('change'); } + + @if (!$task && !$clientPublicId) + $('.client-select input.form-control').focus(); + @else + $('#description').focus(); + @endif });