From c256d0891b78f13dfc050a7c9a4a64c635bce44c Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Wed, 5 Oct 2016 22:17:04 -0400 Subject: [PATCH] dont conflict message sending with topic creation --- frontend/src/Metamaps/Listeners.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/Metamaps/Listeners.js b/frontend/src/Metamaps/Listeners.js index 2eb092dd..f78a030b 100644 --- a/frontend/src/Metamaps/Listeners.js +++ b/frontend/src/Metamaps/Listeners.js @@ -18,7 +18,10 @@ const Listeners = { switch (e.which) { case 13: // if enter key is pressed - JIT.enterKeyHandler() + // prevent topic creation if sending a message + if (e.target.className !== 'chat-input') { + JIT.enterKeyHandler() + } e.preventDefault() break case 27: // if esc key is pressed