Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab width doesn't revert to normal after closing tabs (without hovering the tab) #8358

Open
zadjii-msft opened this issue Apr 3, 2023 · 0 comments
Labels
area-TabView bug Something isn't working product-winui2 team-Controls Issue for the Controls team

Comments

@zadjii-msft
Copy link
Member

Describe the bug

As in microsoft/terminal#9822

Previously attempted to be fixed in #6160

Proposed fix from microsoft/terminal#9822 (comment)

@ranjeshj the fix for this particular problem (not when cursor is still over tabs and a tab is closed via keyboard) is to change line 782 to UpdateTabWidths() instead of UpdateTabWidths(true, false) only if the user closed the tab via keyboard. This will force TabView to use all the available width to size the tabs. I don't know why we need fillAllAvailableSpace bool in UpdateTabWidths at all. Passing false to shouldUpdateTabWidths will "achieve" the same result in case we don't need to resize tabs while user's cursor is still located over them. So to summarize:

  1. In case of tab closure via keyboard call UpdateTabWidths() on line 782.
  2. Keyboard close should be specially handled because if the user's cursor is located on the tabs and a tab is closed via keyboard - tabview won't resize.

Steps to reproduce the bug

gh-9822-aug-2022

(the numberbox at the start of the gif shows that I've definitely got 2.8, b/c microsoft/terminal#13495 is fixed)

As I close tabs, they still don't seem to resize.

as outlined in a comment above - there's still a bug that if the cursor is over tabs and a tab is removed via keyboard - it still won't resize but that doesn't look what you're seeing.

Expected behavior

No response

Screenshots

No response

NuGet package version

WinUI 2 - Microsoft.UI.Xaml 2.8.2

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TabView bug Something isn't working product-winui2 team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

2 participants