From f4c585eef17a8d25a67fca3840dd6e921114aaa5 Mon Sep 17 00:00:00 2001 From: B SIMAK AHMED <1NZ24CS030@newhorizonindia.edu> Date: Wed, 23 Sep 2026 19:50:38 +0530 Subject: [PATCH 1/2] feat: add global copy protection --- src/routes/__root.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index d839d15..63a93cb 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -124,7 +124,11 @@ function RootShell({ children }: { children: ReactNode }) { - + event.preventDefault()} + onCopy={(event) => event.preventDefault()} + onCut={(event) => event.preventDefault()} + > {children} From 7c9db0819866e6ae03075d928ef67a3e27bb4270 Mon Sep 17 00:00:00 2001 From: B SIMAK AHMED <1NZ24CS030@newhorizonindia.edu> Date: Wed, 23 Sep 2026 19:50:40 +0530 Subject: [PATCH 2/2] feat: add global copy protection --- src/styles.css | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/styles.css b/src/styles.css index 0e299da..4fe8077 100644 --- a/src/styles.css +++ b/src/styles.css @@ -170,6 +170,37 @@ @keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } @utility float-slow { animation: float 6s ease-in-out infinite; } +/* =========================== + Copy Protection + Prevent normal content selection/copying while preserving + text entry and selection inside interactive controls. +=========================== */ +body { + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; +} + +input, +textarea, +select, +button, +[contenteditable="true"], +[contenteditable=""], +[role="textbox"] { + user-select: text; + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; +} + +img, +svg { + -webkit-user-drag: none; + user-drag: none; +} + /* =========================== Blog Markdown Styling =========================== */