diff --git a/src/components/quiz/QuizQuestions.tsx b/src/components/quiz/QuizQuestions.tsx index 2acab73..9e1f85c 100644 --- a/src/components/quiz/QuizQuestions.tsx +++ b/src/components/quiz/QuizQuestions.tsx @@ -17,8 +17,9 @@ interface QuizQuestionsProps { const QuizQuestions: React.FC = ({ questions, answers, onAnswerChange }) => { useEffect(() => { // 오른쪽 클릭 방지 - const handleContextMenu = (e: MouseEvent) => e.preventDefault(); + const handleContextMenu = (e: MouseEvent | TouchEvent) => e.preventDefault(); document.addEventListener('contextmenu', handleContextMenu); + document.addEventListener('touchstart', handleContextMenu); // 텍스트 선택 방지 document.body.style.userSelect = 'none'; @@ -34,6 +35,7 @@ const QuizQuestions: React.FC = ({ questions, answers, onAns // 컴포넌트 언마운트 시 이벤트 제거 return () => { document.removeEventListener('contextmenu', handleContextMenu); + document.removeEventListener('touchstart', handleContextMenu); document.removeEventListener('keydown', handleKeyDown); document.body.style.userSelect = 'auto'; };