Skip to content

Fix z-index issue in terminal inline chat suggest#295968

Open
bangseongbeom wants to merge 4 commits intomicrosoft:mainfrom
bangseongbeom:patch-1
Open

Fix z-index issue in terminal inline chat suggest#295968
bangseongbeom wants to merge 4 commits intomicrosoft:mainfrom
bangseongbeom:patch-1

Conversation

@bangseongbeom
Copy link
Copy Markdown

Increase terminal z-index to resolve #295960.

Set z-index to 12 since the scrollbar is 11.

Copilot AI review requested due to automatic review settings February 18, 2026 09:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a z-index stacking issue where the scrollbar and active item indicator were rendering on top of the terminal inline chat's suggest widget. The fix elevates the terminal container's z-index from 0 to 12, positioning it above the scrollbar (z-index 11) while maintaining proper stacking context.

Changes:

  • Increased .pane-body.integrated-terminal z-index from 0 to 12 to ensure terminal UI elements appear above the scrollbar

@meganrogge
Copy link
Copy Markdown
Collaborator

@bangseongbeom let's add specificity to the css selector so it only does this in the terminal inline chat

@bangseongbeom
Copy link
Copy Markdown
Author

@meganrogge I tried that, but we need to remove the terminal's stacking context first.

Since the inline chat is inside the terminal, and the terminal has z-index: 0, increasing z-index of elements inside the terminal won't solve the problem. This is because no matter how high we set the z-index of any element inside the terminal, it cannot be placed above the scrollbar.

The .monaco-editor .suggest-widget already has z-index: 40, so if we just remove the terminal's stacking context (remove the z-index), it should work.

However, we need to be careful because doing this basically reverts @tisilent's commit 0768cbe.

@meganrogge
Copy link
Copy Markdown
Collaborator

With your change, I see this in the terminal, which we do not want.

Screenshot 2026-02-19 at 2 24 00 PM

@tisilent
Copy link
Copy Markdown
Contributor

Maybe #175890 . 🤯

…x of `.monaco-editor .suggest-widget`"

This reverts commit 482a0db.
@bangseongbeom
Copy link
Copy Markdown
Author

bangseongbeom commented Feb 20, 2026

With your change, I see this in the terminal, which we do not want.

Maybe #175890 . 🤯

Hmm… as you showed, it seems impossible to remove the z-index from the terminal.

If the terminal should have z-index: 0 (its original state), then no matter how high you set the z-index of its child elements, it doesn't working. The terminal establishes its own stacking context with z-index: 0, so it and its descendants will always be stacked below the scrollbar (z-index: 11).

As I suggested at the beginning, the best option seems to be setting the terminal's z-index higher than the scrollbar's. I reverted it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The scroll bar and active item indicator are rendered on top of the terminal inline chat suggest

6 participants