Commit 692773c5 authored by Phil Hughes's avatar Phil Hughes

ctrl+enter on mac correctly submits forms

Closes #4177
parent f8c4dc97
...@@ -24,10 +24,7 @@ keyCodeIs = (e, keyCode) -> ...@@ -24,10 +24,7 @@ keyCodeIs = (e, keyCode) ->
$(document).on 'keydown.quick_submit', '.js-quick-submit', (e) -> $(document).on 'keydown.quick_submit', '.js-quick-submit', (e) ->
return unless keyCodeIs(e, 13) # Enter return unless keyCodeIs(e, 13) # Enter
if isMac() return unless (e.metaKey && !e.altKey && !e.ctrlKey && !e.shiftKey) || (e.ctrlKey && !e.altKey && !e.metaKey && !e.shiftKey)
return unless (e.metaKey && !e.altKey && !e.ctrlKey && !e.shiftKey)
else
return unless (e.ctrlKey && !e.altKey && !e.metaKey && !e.shiftKey)
e.preventDefault() e.preventDefault()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment