diff --git a/src/scripts/tutti/10_tasks.js b/src/scripts/tutti/10_tasks.js index 4a8ec96..db91088 100644 --- a/src/scripts/tutti/10_tasks.js +++ b/src/scripts/tutti/10_tasks.js @@ -466,9 +466,11 @@ $(function() { var save_on_ctrl_enter = ['shot', 'asset', 'task']; $(document).on('keyup', function(e){ - if ($.inArray(ProjectUtils.context(), save_on_ctrl_enter)) { - // Save on Ctrl + Enter anytime except when comments is on focus - if ($('#comment_field') && $('#comment_field').not(':focus')){ + if ($.inArray(save_on_ctrl_enter, ProjectUtils.context())) { + var active = document.activeElement; + + // Save on Ctrl + Enter anytime except when comment field is on focus + if (active.id != 'comment_field'){ if ((e.keyCode == 10 || e.keyCode == 13) && e.ctrlKey){ $("#item-save").trigger( "click" ); }