Skip to content
Bug reportAug 28, 2026· 0:22· 14 views

GraphiQL: closing a tab to the right of the active tab moves selection left

0:22 total

Comments · 0

Be the first to comment.

Bug report— by SceneRecap AI

mediumtab management / state indexing
os: macOSbrowser: Chromium 151.0.7922.34viewport: 1280x720

Repro steps

  1. 1.Open GraphiQL with the initial default tab.
  2. 2.Click the 'New tab' (+) button three times to create four tabs in total.
  3. 3.Click on the second tab to make it the active tab.
  4. 4.Click the 'Close Tab' (x) button on a tab to the right of the active tab (e.g., tab 3).

Expected

Closing an inactive tab to the right should close that tab while preserving the currently active tab (tab 2).

Actual

Closing the tab to the right causes the active tab selection to jump back to tab 1, replacing the current editor view with tab 1's content.

Evidence

visualAt 9.0s-11.0s, the second tab is active with an empty editor. At 13.0s, after closing tab 3, the first tab becomes active and displays the welcome text.
Issue markdown (copy-paste ready)
### Summary
When multiple tabs exist in GraphiQL and a tab located to the right of the active tab is closed, the active tab index resets/shifts to the first tab (tab 1) instead of preserving the currently active tab.

### Steps to Reproduce
1. Open GraphiQL (0.0s).
2. Click the **New tab** (`+`) button three times to open multiple `<untitled>` tabs (4.3s - 6.6s).
3. Select the second `<untitled>` tab to make it active (8.0s).
4. Click the close (`x`) button on the third tab to the right of the active tab (11.9s).

### Expected Result
The closed tab is removed, and the second tab remains active without losing its editor focus or contents.

### Actual Result
The active tab selection shifts left to the first tab (`<untitled>`), displaying the welcome query editor contents.

*Recorded with SceneRecap.*

Your recordings could explain themselves too.

Free plan · silent recordings welcome · bug reports included.

Try SceneRecap free
GraphiQL: closing a tab to the right of the active tab moves selection left · SceneRecap