Repository navigation
Fix terminal not focusing when clicking blank space below inline chat widget - #334804
Megan Rogge (meganrogge) merged 4 commits into
Conversation
… widget The terminal-inline-chat container was stretched full height by CSS top/bottom positioning, leaving empty space below the widget that swallowed clicks meant for the terminal. Make the container pointer-events: none and only re-enable them on the visible widget. Fixes microsoft#333458
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
|
|
Hi Megan Rogge (@meganrogge) , just following up on this PR when you have a chance. The fix has been tested on Windows and addresses the terminal focus issue caused by the inline chat container capturing clicks in the blank area. Thanks! |
Megan Rogge (meganrogge)
left a comment
There was a problem hiding this comment.
Thanks for the fix and the clear explanation!
Dmitriy Vasyura (dmitrivMS)
left a comment
There was a problem hiding this comment.
Chethan Krishna (@Chethan616) please fix formatting:
[hygiene --changed-since ccf7045] src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css(13,1): Bad whitespace indentation
[hygiene --changed-since ccf7045] src/vs/workbench/contrib/terminalContrib/chat/browser/media/terminalChatWidget.css(14,1): Bad whitespace indentation
Comment continuation lines used plain spaces instead of the standard tab + asterisk block-comment style, which the build/hygiene.ts whitespace check does not accept. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Head branch was pushed to by a user without write access
40c458a
|
Hi Dmitriy Vasyura (@dmitrivMS), thanks for catching that. Fixed the indentation on both lines, the comment continuation was using plain spaces instead of the standard tab + asterisk block comment style used elsewhere in the file. Pushed the fix, should be clean now. |
addressed
a51a16a
into
microsoft:main
Fixes #333458
What's happening
The
.terminal-inline-chatcontainer is positioned absolutely withbottom: 0, whileterminalChatWidget.tsalso sets an inlinetopstyle to anchor it near the cursor. Withheight: autoand bothtopandbottomset, the container stretches to fill the whole gap instead of shrink-wrapping to the widget's actual content, leaving an invisible region below the visible widget that still captures clicks meant for the terminal.Fix
Make the outer container transparent to pointer events and only re-enable them on the visible
.inline-chatbox, so clicks in the empty space fall through to the terminal underneath.Testing
document.activeElementstayed on<body>, terminal never focuseddocument.activeElementbecame the terminal'sxterm-helper-textarea