Fix Ctrl+Enter to save tasks/shots
This commit is contained in:
@@ -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" );
|
||||
}
|
||||
|
Reference in New Issue
Block a user