Skip to content

Commit c925e43

Browse files
gkamradtclaude
andcommitted
fix: improve terminal focus handling for better click-to-front behavior
Add onMouseDown handlers to terminal title bar and content area to ensure clicking anywhere on the terminal brings it to the front layer. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c27ad81 commit c925e43

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/components/TerminalWindow/TerminalWindow.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ export function TerminalWindow({
113113
id={`terminal-${id}`}
114114
>
115115
{/* Title Bar */}
116-
<div className="terminal-title-bar bg-gray-400 border-b border-gray-500 h-6 flex items-center text-center text-black select-none cursor-move">
116+
<div className="terminal-title-bar bg-gray-400 border-b border-gray-500 h-6 flex items-center text-center text-black select-none cursor-move"
117+
onMouseDown={() => onFocus && onFocus(id)}>
117118
{/* Traffic Lights */}
118119
<div className="flex ml-2 items-center space-x-2 no-drag">
119120
<div
@@ -134,6 +135,7 @@ export function TerminalWindow({
134135
<div
135136
ref={contentRef}
136137
className={`terminal-content flex-grow pl-2 pr-2 pt-1 h-auto ${getColorForRole('primary')} font-mono text-xs ${currentTheme.background} overflow-y-auto select-text text-left`}
138+
onMouseDown={() => onFocus && onFocus(id)}
137139
>
138140
{/* ASCII Art Header */}
139141
<pre>

0 commit comments

Comments
 (0)