summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2017-03-23 03:03:39 +0000
committerAlfredo Sumaran <alfredo@gitlab.com>2017-03-23 03:03:39 +0000
commitad369a9609a9a2b68815204537405134eaabd6cd (patch)
treeb3baee8a9f649d72247a4fd78371309175c998af /app
parent011664fdd1b0352074f0a6ee666f99a464ebf813 (diff)
downloadgitlab-ce-ad369a9609a9a2b68815204537405134eaabd6cd.tar.gz
Fix `Ctrl+Enter` support for Quick Submit
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/shortcuts.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/shortcuts.js b/app/assets/javascripts/shortcuts.js
index 81766f4bd55..fd5097696ad 100644
--- a/app/assets/javascripts/shortcuts.js
+++ b/app/assets/javascripts/shortcuts.js
@@ -33,6 +33,10 @@
};
Shortcuts.prototype.toggleMarkdownPreview = function(e) {
+ // Check if short-cut was triggered while in Write Mode
+ if ($(e.target).hasClass('js-note-text')) {
+ $('.js-md-preview-button').focus();
+ }
return $(document).triggerHandler('markdown-preview:toggle', [e]);
};