@@ -53,15 +53,6 @@ namespace winrt::TerminalApp::implementation
5353 }
5454 });
5555
56- // GH#9162 - when the header is done renaming, ask for focus to be
57- // tossed back to the control, rather into ourselves.
58- _headerControl.RenameEnded ([weakThis = get_weak ()](auto &&, auto &&) {
59- if (auto tab{ weakThis.get () })
60- {
61- tab->_RequestFocusActiveControlHandlers ();
62- }
63- });
64-
6556 _UpdateHeaderControlMaxWidth ();
6657
6758 // Use our header control as the TabViewItem's header
@@ -92,7 +83,7 @@ namespace winrt::TerminalApp::implementation
9283 // - <none>
9384 void TerminalTab::_MakeTabViewItem ()
9485 {
95- TabBase::_MakeTabViewItem ( );
86+ TabViewItem (::winrt::MUX::Controls::TabViewItem{} );
9687
9788 TabViewItem ().DoubleTapped ([weakThis = get_weak ()](auto && /* s*/ , auto && /* e*/ ) {
9889 if (auto tab{ weakThis.get () })
@@ -841,22 +832,13 @@ namespace winrt::TerminalApp::implementation
841832 }
842833
843834 // Build the menu
844- Controls::MenuFlyout contextMenuFlyout ;
835+ Controls::MenuFlyout newTabFlyout ;
845836 Controls::MenuFlyoutSeparator menuSeparator;
846- contextMenuFlyout.Items ().Append (chooseColorMenuItem);
847- contextMenuFlyout.Items ().Append (renameTabMenuItem);
848- contextMenuFlyout.Items ().Append (menuSeparator);
849-
850- // GH#5750 - When the context menu is dismissed with ESC, toss the focus
851- // back to our control.
852- contextMenuFlyout.Closed ([weakThis](auto &&, auto &&) {
853- if (auto tab{ weakThis.get () })
854- {
855- tab->_RequestFocusActiveControlHandlers ();
856- }
857- });
858- _AppendCloseMenuItems (contextMenuFlyout);
859- TabViewItem ().ContextFlyout (contextMenuFlyout);
837+ newTabFlyout.Items ().Append (chooseColorMenuItem);
838+ newTabFlyout.Items ().Append (renameTabMenuItem);
839+ newTabFlyout.Items ().Append (menuSeparator);
840+ _AppendCloseMenuItems (newTabFlyout);
841+ TabViewItem ().ContextFlyout (newTabFlyout);
860842 }
861843
862844 // Method Description:
0 commit comments