From 8fca68438f65014294d7b4e35473467ae0aa2511 Mon Sep 17 00:00:00 2001 From: Nicolas Perriault Date: Mon, 17 Jul 2017 16:14:35 +0200 Subject: [PATCH] Actually subscribe to key events. --- src/Subscription.elm | 1 + src/View/Draft.elm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Subscription.elm b/src/Subscription.elm index 7aa6930..8bc07dc 100644 --- a/src/Subscription.elm +++ b/src/Subscription.elm @@ -60,4 +60,5 @@ subscriptions { clients, currentView } = , uploadSuccessSub , uploadErrorSub , keyDownsSub + , keyUpsSub ] diff --git a/src/View/Draft.elm b/src/View/Draft.elm index 8a89dd7..f779809 100644 --- a/src/View/Draft.elm +++ b/src/View/Draft.elm @@ -197,7 +197,7 @@ draftView ({ draft, currentUser, ctrlPressed } as model) = Ok NoOp else if code == 27 then Ok <| DraftEvent CloseAutocomplete - else if code == 13 && ctrlPressed then + else if ctrlPressed && code == 13 then Ok SubmitDraft else Err "not handling that key"