diff --git a/app/layout.tsx b/app/layout.tsx
index f40a72abb2..1579049bfd 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,5 +1,6 @@
import type { Metadata } from 'next'
import './globals.css'
+import { ZoomPrevention } from './zoom-prevention'
export const metadata: Metadata = {
title: 'Sim Studio',
@@ -14,7 +15,16 @@ export default function RootLayout({
}) {
return (
-
{children}
+
+
+
+
+
+ {children}
+
)
}
diff --git a/app/zoom-prevention.tsx b/app/zoom-prevention.tsx
new file mode 100644
index 0000000000..66f0ceb74b
--- /dev/null
+++ b/app/zoom-prevention.tsx
@@ -0,0 +1,33 @@
+'use client'
+
+import { useEffect } from 'react'
+
+export function ZoomPrevention() {
+ useEffect(() => {
+ const preventZoom = (e: KeyboardEvent | WheelEvent) => {
+ // Prevent zoom on ctrl/cmd + wheel
+ if (e instanceof WheelEvent && (e.ctrlKey || e.metaKey)) {
+ e.preventDefault()
+ }
+
+ // Prevent zoom on ctrl/cmd + plus/minus/zero
+ if (e instanceof KeyboardEvent && (e.ctrlKey || e.metaKey)) {
+ if (e.key === '=' || e.key === '-' || e.key === '0') {
+ e.preventDefault()
+ }
+ }
+ }
+
+ // Add event listeners
+ document.addEventListener('wheel', preventZoom, { passive: false })
+ document.addEventListener('keydown', preventZoom)
+
+ // Cleanup
+ return () => {
+ document.removeEventListener('wheel', preventZoom)
+ document.removeEventListener('keydown', preventZoom)
+ }
+ }, [])
+
+ return null
+}