Skip to content

Terminal doesn't focus if you click the blank space below a copilot terminal widget #333458

Closed

Description

@mjbvz

Type: Bug

  1. In a new intergrated terminal
  2. Open inline copilot widget
  3. Click in the blank area below the widget and then press escape to try closing the copilot widget

Here's an image of the blank space I am talking about below the widget:

Image

Expected
Clicking in the blank area should focus the terminal: the terminal carret should indicate that you're focused and typing letters should enter them in the terminal. This is what happens when the copilot widget isn't open

Actual
The terminal isn't focused. This means pressing esc does nothing, which makes it confusing trying to figure out how to close the copilot widget

VS Code version: Code - Insiders 1.136.0-insider (Universal) (d5ceefb, 2026-08-28T16:34:03Z)
OS version: Darwin arm64 25.5.0
Modes:

System Info
Item Value
CPUs Apple M5 Max (18 x 2400)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x106b [Google Inc. (Apple)], DEVICE=0x0000 [ANGLE (Apple, ANGLE Metal Renderer: Apple M5 Max, Version 26.5.2 (Build 25F84))], DRIVER_VENDOR=Apple, DRIVER_VERSION=26.5.2 ACTIVE
Machine model name: Mac
Machine model version: 17.6
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: enabled_on
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 5, 7, 6
Memory (System) 128.00GB (1.86GB free)
Process Argv --crash-reporter-id 0a11e423-12d6-487c-8f58-c4bca32c2316
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
pythonvspyt551cf:31249598
nativeloc1:31118317
dwcopilot:31158714
dwoutputs:31242946
copilot_t_ci:31333650
g012b348:31231168
pythonrdcb7:31268811
pythonpcpt1:31399616
6518g693:31302842
82j33506:31327384
envsactivate1:31349248
editstats-enabled:31346256
cloudbuttont:31366566
3efgi100_wstrepl:31403338
839jf696:31457053
cp_cls_t_966_ss:31526232
4je02754:31565972
c3h7c220:31478652
cp_cls_t_1081:31454832
conptydll_true:31485575
e9c30283:31453065
46204921:31447328
capico_a_098a3278:31555650
ei9d7968:31462942
f860i809:31458078
89g7j272:31506658
hhf17803:31462392
i2gc6536:31472020
52612955:31508042
h08i8180:31475367
23c7c724:31520045
ddid_c:31478205
hmra_i5g22:31518061
bjc72774_agent_sandbox:31538428
7df3h592:31491241
cp_cls_t_1082:31535311
logging_enabled_new:31490725
jb_cp_cls_t_632:31543129
b1g4i769:31503653
ha629193:31508444
a1ije391_t:31533808
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
d7b18187:31526828
hide-eh-duplicates:31543293
replace-eh-with-ah:31545853
ihg5j128:31534457
f412h606:31543414
sandbox-ui-on-2:31543161
nes-ex-cf-euporie-03:31542847
enable_editor_pane_layout:31551200
52258b4d:31547953
36h42362:31560305
c7c27ce7:31551212
6577i413_copy:31558653
1h923230:31564177
0dg73464:31554309
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0c1h4866:31562347
cch_brk_fls:31570145
5b8j3302:31564600
mangle-name-treatment:31568054
allow-signed-out:31574470
codex-agent-enabled:31566739
lunaclean:31570525
64a8d082:31573709
issue8950-e3349a92:31574958
39a5d156:31574988
permission_prompt_control:1332567
ccr_pr_nudge_adoption:1319471
vsc_wsm_c:1324224
eh853263:1355661
auto_mode_control:1359303
g03gg798:1358539

Activity

  1. added
    terminal
    on Aug 31, 2026
  2. added
    terminal-inline-chat
    bug
    on Aug 31, 2026
  3. Chethan616 commented on Sep 6, 2026

    @Chethan616
    Contributor

    I'd like to take a crack at fixing this - looks like a pointer-events issue on the terminal-inline-chat container. Will open a PR shortly.

  4. added 2 commits that reference this issue on Nov 6, 2026
    a5668d2
    a51a16a
  5. added
    unreleased
    on Nov 6, 2026
  6. vs-code-engineering commented on Nov 6, 2026

    @vs-code-engineering
    Contributor

    Sharing media and context from merged PR #334804 for verification:

    What's happening

    The .terminal-inline-chat container is positioned absolutely with bottom: 0, while terminalChatWidget.ts also sets an inline top style to anchor it near the cursor. With height: auto and both top and bottom set, 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.

    Blank space below the terminal inline chat widget

    Fix

    Make the outer container transparent to pointer events and only re-enable them on the visible .inline-chat box, so clicks in the empty space fall through to the terminal underneath.

    Testing

    • Reproduced on Windows: opened terminal inline chat, maximized the panel, clicked below the widget — document.activeElement stayed on <body>, terminal never focused
    • Applied the fix and repeated the same click — document.activeElement became the terminal's xterm-helper-textarea
    • Confirmed the widget's own input is still focusable/clickable after the fix (no regression)

    Source PR: #334804

  7. added
    insiders-released
    and removed
    unreleased
    on Nov 7, 2026
  8. added
    verified
    on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buginsiders-releasedterminalterminal-inline-chatverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions