From 26c21e6a274a95d9bb504e8210c03086dd167b13 Mon Sep 17 00:00:00 2001 From: ix Date: Wed, 7 Jan 2015 00:52:19 +0100 Subject: [PATCH] fixed being unable to use cmd+enter on macs --- app/assets/javascripts/inbox.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/inbox.coffee b/app/assets/javascripts/inbox.coffee index a8f02627..397fb515 100644 --- a/app/assets/javascripts/inbox.coffee +++ b/app/assets/javascripts/inbox.coffee @@ -57,7 +57,7 @@ $(document).on "keydown", "textarea[name=ib-answer]", (evt) -> iid = $(this)[0].dataset.id - if evt.keyCode == 13 and evt.ctrlKey + if evt.keyCode == 13 and (evt.ctrlKey or evt.metaKey) # trigger warning: $("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 complete: (jqxhr, status) -> btn.button "reset" - $("textarea[name=ib-answer][data-id=#{iid}]").removeAttr "readonly" \ No newline at end of file + $("textarea[name=ib-answer][data-id=#{iid}]").removeAttr "readonly"