From 81c20e67923ddf4e0a55234d000993916150daec Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Wed, 1 Jun 2022 23:53:30 +0200 Subject: [PATCH] fix: #122 ctrl enter would add newline --- repl/src/App.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repl/src/App.jsx b/repl/src/App.jsx index 3480a27d..0c5e90a6 100644 --- a/repl/src/App.jsx +++ b/repl/src/App.jsx @@ -87,8 +87,8 @@ function App() { } } }; - window.addEventListener('keydown', handleKeyPress); - return () => window.removeEventListener('keydown', handleKeyPress); + window.addEventListener('keydown', handleKeyPress, true); + return () => window.removeEventListener('keydown', handleKeyPress, true); }, [pattern, code, activateCode, cycle]); useHighlighting({ view, pattern, active: cycle.started && !activeCode?.includes('strudel disable-highlighting') });