diff --git a/app/[locale]/bible/reader.tsx b/app/[locale]/bible/reader.tsx index 46fa94a..a7580a6 100644 --- a/app/[locale]/bible/reader.tsx +++ b/app/[locale]/bible/reader.tsx @@ -298,6 +298,23 @@ export default function BibleReaderNew() { // Keyboard shortcuts useEffect(() => { const handleKeyDown = (e: KeyboardEvent) => { + // Don't trigger shortcuts if user is typing in an input field + const activeElement = document.activeElement as HTMLElement + if (activeElement && ( + activeElement.tagName === 'INPUT' || + activeElement.tagName === 'TEXTAREA' || + activeElement.isContentEditable || + activeElement.closest('[role="dialog"]') // Don't trigger if a dialog/modal is open + )) { + return + } + + // Check if the floating chat is open + const floatingChat = document.querySelector('[data-floating-chat="true"]') + if (floatingChat) { + return + } + if (e.ctrlKey || e.metaKey) return switch (e.key) { diff --git a/components/chat/floating-chat.tsx b/components/chat/floating-chat.tsx index 0317285..7acfb18 100644 --- a/components/chat/floating-chat.tsx +++ b/components/chat/floating-chat.tsx @@ -192,6 +192,7 @@ export default function FloatingChat() {