diff options
author | Phil Hughes <me@iamphill.com> | 2016-03-04 10:11:15 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-03-04 10:11:15 +0000 |
commit | 692773c5a0a8e203442e119b57ae32adf25de67e (patch) | |
tree | c47934cf4bd015d8e41346d01b23d630453143a0 /app/assets/javascripts/behaviors | |
parent | f8c4dc97230c520df077c1274fd8d88680da5242 (diff) | |
download | gitlab-ce-692773c5a0a8e203442e119b57ae32adf25de67e.tar.gz |
ctrl+enter on mac correctly submits formsctr-enter-textarea-mac
Closes #4177
Diffstat (limited to 'app/assets/javascripts/behaviors')
-rw-r--r-- | app/assets/javascripts/behaviors/quick_submit.js.coffee | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/assets/javascripts/behaviors/quick_submit.js.coffee b/app/assets/javascripts/behaviors/quick_submit.js.coffee index 61c2e4f698c..6e29d374267 100644 --- a/app/assets/javascripts/behaviors/quick_submit.js.coffee +++ b/app/assets/javascripts/behaviors/quick_submit.js.coffee @@ -24,10 +24,7 @@ keyCodeIs = (e, keyCode) -> $(document).on 'keydown.quick_submit', '.js-quick-submit', (e) -> return unless keyCodeIs(e, 13) # Enter - if isMac() - return unless (e.metaKey && !e.altKey && !e.ctrlKey && !e.shiftKey) - else - return unless (e.ctrlKey && !e.altKey && !e.metaKey && !e.shiftKey) + return unless (e.metaKey && !e.altKey && !e.ctrlKey && !e.shiftKey) || (e.ctrlKey && !e.altKey && !e.metaKey && !e.shiftKey) e.preventDefault() |