Reordering tabs messes up relation between tabs and panes #19643

Closed
opened 2026-01-31 06:49:32 +00:00 by claunia · 3 comments
Owner

Originally created by @djdv on GitHub (Apr 5, 2023).

Originally assigned to: @zadjii-msft on GitHub.

Windows Terminal version

62448969b3

Windows build number

10.0.25330.0

Other Software

No response

Steps to reproduce

Open multiple tabs. Reorder them.

Expected Behavior

No response

Actual Behavior

The relation/index between tabs and panes is now broken.
Selecting a tab will select a pane which does not belong to that tab. Closing panes will close the wrong tab.
See: https://www.youtube.com/watch?v=Qa9jxFnvI8U

Originally created by @djdv on GitHub (Apr 5, 2023). Originally assigned to: @zadjii-msft on GitHub. ### Windows Terminal version 62448969b30325a75f35201427a052de0e4dbb7d ### Windows build number 10.0.25330.0 ### Other Software _No response_ ### Steps to reproduce Open multiple tabs. Reorder them. ### Expected Behavior _No response_ ### Actual Behavior The relation/index between tabs and panes is now broken. Selecting a tab will select a pane which does not belong to that tab. Closing panes will close the wrong tab. See: https://www.youtube.com/watch?v=Qa9jxFnvI8U
Author
Owner

@zadjii-msft commented on GitHub (Apr 13, 2023):

More concrete repro steps:

  • Open two windows
  • In one window, open two tabs. Pwsh and CMD are good, so they're clearly separate.
  • Reorder those two.
  • Drag the inactive one to the other window.
  • Experience having the active term core in both windows!

It's so obvious:

Wait but no, _onTabStripDrop doesn't ever cause a _MoveTab. It triggers a _RequestReceiveContentHandlers, which is bubbled to the sender, which does a SendContentToOther, which does a _MoveContent on the dragged tab. Hmm.

@zadjii-msft commented on GitHub (Apr 13, 2023): More concrete repro steps: * Open two windows * In one window, open two tabs. Pwsh and CMD are good, so they're clearly separate. * Reorder those two. * Drag the inactive one to the other window. * Experience having the active term core in both windows! <hr> ~It's so obvious:~ ![](https://user-images.githubusercontent.com/18356694/231828087-7a191811-9248-4ef7-970e-5575801c6b84.png) Wait but no, `_onTabStripDrop` doesn't ever cause a `_MoveTab`. It triggers a `_RequestReceiveContentHandlers`, which is bubbled to the sender, which does a `SendContentToOther`, which does a `_MoveContent` on the dragged tab. Hmm.
Author
Owner

@zadjii-msft commented on GitHub (Apr 13, 2023):

oh its so bad

Just reordering tabs, no tearout, just breaks the entire relationship of it. I wonder if adding these drag/drop handlers somehow broke the reorder events we get...

It sure did. We don't get TabView.TabItemsChanged anymore now that we get TabDragStarting & TabStripDrop. WELP. Let's see what we can do.

@zadjii-msft commented on GitHub (Apr 13, 2023): oh its so bad Just reordering tabs, no tearout, just breaks the entire relationship of it. I wonder if adding these drag/drop handlers somehow broke the reorder events we get... It sure did. We don't get `TabView.TabItemsChanged` anymore now that we get `TabDragStarting` & `TabStripDrop`. WELP. Let's see what we can do.
Author
Owner

@zadjii-msft commented on GitHub (Apr 13, 2023):

Upstream: https://github.com/microsoft/microsoft-ui-xaml/issues/8388

@zadjii-msft commented on GitHub (Apr 13, 2023): Upstream: https://github.com/microsoft/microsoft-ui-xaml/issues/8388
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19643