From 1d0f898fc9b164e105e0cfd8f1c4000b67e80d5e Mon Sep 17 00:00:00 2001 From: cami Date: Fri, 23 Jul 2021 00:59:39 +0200 Subject: [PATCH] Do not allow copy and paste in survey (fix #197) --- frontend/src/components/GeneratedPassword.jsx | 2 +- frontend/src/components/pages/Study.jsx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/GeneratedPassword.jsx b/frontend/src/components/GeneratedPassword.jsx index b0920a1..1dfb3af 100644 --- a/frontend/src/components/GeneratedPassword.jsx +++ b/frontend/src/components/GeneratedPassword.jsx @@ -9,7 +9,7 @@ export default function GeneratedPassword(props) { return ( <> -

+

Das Passwort für diese Situation lautet:{" "} {props.genPassword}

diff --git a/frontend/src/components/pages/Study.jsx b/frontend/src/components/pages/Study.jsx index e8588ab..dec7bc3 100644 --- a/frontend/src/components/pages/Study.jsx +++ b/frontend/src/components/pages/Study.jsx @@ -75,6 +75,10 @@ export default function Study() { e.preventDefault(); return false; }; + const handleOnCopyEvent = (e) => { + e.preventDefault(); + return false; + }; const checkIfUsernameIsCorrect = () => { return serverUsername === username; @@ -96,7 +100,6 @@ export default function Study() { }; const checkIfValuesAreCorrect = () => { - console.log(checkIfPasswordIsCorrect()); return checkIfPasswordIsCorrect() && checkIfUsernameIsCorrect(); };