fixed being unable to use cmd+enter on macs

This commit is contained in:
ix 2015-01-07 00:52:19 +01:00
parent f76603a071
commit 26c21e6a27
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@
$(document).on "keydown", "textarea[name=ib-answer]", (evt) -> $(document).on "keydown", "textarea[name=ib-answer]", (evt) ->
iid = $(this)[0].dataset.id iid = $(this)[0].dataset.id
if evt.keyCode == 13 and evt.ctrlKey if evt.keyCode == 13 and (evt.ctrlKey or evt.metaKey)
# trigger warning: # trigger warning:
$("button[name=ib-answer][data-ib-id=#{iid}]").trigger 'click' $("button[name=ib-answer][data-ib-id=#{iid}]").trigger 'click'
@ -120,4 +120,4 @@ $(document).on "click", "button[name=ib-destroy]", ->
showNotification "An error occurred, a developer should check the console for details", false showNotification "An error occurred, a developer should check the console for details", false
complete: (jqxhr, status) -> complete: (jqxhr, status) ->
btn.button "reset" btn.button "reset"
$("textarea[name=ib-answer][data-id=#{iid}]").removeAttr "readonly" $("textarea[name=ib-answer][data-id=#{iid}]").removeAttr "readonly"