From a0b302fdcd8be4d054d26966252e5d2b406e582f Mon Sep 17 00:00:00 2001 From: ghalestrilo Date: Thu, 13 Aug 2020 18:34:35 -0300 Subject: [PATCH] :construction: enable keyboard shortcuts on mobile --- client/modules/IDE/pages/MobileIDEView.jsx | 1 - client/utils/custom-hooks.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/client/modules/IDE/pages/MobileIDEView.jsx b/client/modules/IDE/pages/MobileIDEView.jsx index ac73644d..2aa653b2 100644 --- a/client/modules/IDE/pages/MobileIDEView.jsx +++ b/client/modules/IDE/pages/MobileIDEView.jsx @@ -75,7 +75,6 @@ const isUserOwner = ({ project, user }) => // TODO: This could go into const handleGlobalKeydown = (props, cmController) => (e) => { - alert('haha'); const { user, project, ide, setAllAccessibleOutput, diff --git a/client/utils/custom-hooks.js b/client/utils/custom-hooks.js index cf6c0130..7543555c 100644 --- a/client/utils/custom-hooks.js +++ b/client/utils/custom-hooks.js @@ -55,5 +55,5 @@ export const useEffectWithComparison = (fn, props) => { export const useEventListener = (event, callback, useCapture = false) => useEffect(() => { document.addEventListener(event, callback, useCapture); - return document.removeEventListener(event, callback, useCapture); + return () => document.removeEventListener(event, callback, useCapture); }, []);