-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Arrow navigation dismisses tab renamer #9632
Comments
I guess I know how to fix this. |
I don't think the keypress navigated between tabs, though. The tab that I was renaming remained selected. |
This is probably because you had one tab. In this case, focus moves to the + button, and then auto resets to the terminal. In any case the problem is that text box doesn't handle an arrow if the cursor cannot move, and leaves it to the parent. It is a feature. But in our case it is dangerous as it commits the tab name. |
I tried it again on Windows Terminal Preview 1.7.572.0. I have three tabs open. I double-click the title of the second tab to start renaming it, then press the Left arrow key twice. Approximately half of the time, a black focus rectangle briefly flashes around the tab header of the first tab. Very soon after that, the session in the second tab gets the focus again. |
@KalleOlaviNiemitalo - what you describe sounds like some race between TabRenamerDeactivated and _OnTabSelectionChanged handler in the TerminalPage. I think it probably should be a separate issue. Though preventing the arrows from switching focus renders it not reproducible 😄 |
🎉This issue was addressed in #9633, which has now been successfully released as Handy links: |
🎉This issue was addressed in #9633, which has now been successfully released as Handy links: |
Windows Terminal version (or Windows build number)
Dev - latest
Other Software
No response
Steps to reproduce
With 1 open tab, open tab renamer
Go to the end of the title
Click Right.
The renamer is dissmissed
With 2 tabs, open tab renamer in the second tab
Go to beginning of the title
Press Left
The renamer is dismissed
Same applies to Up and Down
Expected Behavior
The renamer shouldn't be dismissed if by mistake the user clicks extra arrow.
Actual Behavior
The renamer is dismissed.
Reported initially by @KalleOlaviNiemitalo in #9520.
The root-cause is that if witin renamer we hit Left but the cursor cannot move as it is already in the beginning, the KeyDown event propagates to the parent control. This way it bubbles up, until it reaches the TabView that handles this key as a navigation between tabs.
The text was updated successfully, but these errors were encountered: