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

CMD+W open new tab but not new window occasionally #756

Closed
raphamorim opened this issue Nov 6, 2024 Discussed in #745 · 11 comments · Fixed by #938
Closed

CMD+W open new tab but not new window occasionally #756

raphamorim opened this issue Nov 6, 2024 Discussed in #745 · 11 comments · Fixed by #938

Comments

@raphamorim
Copy link
Owner

Discussed in #745

Originally posted by hilaolu October 30, 2024
I am using MacOS and rio 0.1.17. Pressing CMD+W sometimes open a new tab on current focus but not a window. The frequency is quite low and the condition to reproduce is elusive. I try many times but only confirm that it happen in 0.1.17 and branch main, without finding any clues. Both CollapsedTab and NativeTab has the problem. Is it a feature and work as expected?

@hilaolu
Copy link
Contributor

hilaolu commented Nov 9, 2024

Thanks.
I try really hard but fail to reproduce. The chance is extremely low.

@hilaolu
Copy link
Contributor

hilaolu commented Nov 14, 2024

Appreciate 0.2.0. May I ask if this is fixed in 0.2.0?

@raphamorim
Copy link
Owner Author

Not yet, sorry about that. I ended up cutting the release ealier

@hilaolu
Copy link
Contributor

hilaolu commented Nov 14, 2024

Never mind. Looking forward to 0.2.1.

@hilaolu
Copy link
Contributor

hilaolu commented Jan 4, 2025

hi, any update on this bug?

@raphamorim
Copy link
Owner Author

Is this still happening (0.2.2)?

I couldn't repro in a while

@hilaolu
Copy link
Contributor

hilaolu commented Jan 12, 2025

I am on 0.2.2. It still happens.

@hilaolu
Copy link
Contributor

hilaolu commented Jan 14, 2025

I will try 0.2.3 first

@raphamorim
Copy link
Owner Author

Okey please lemme know 🙏

@hilaolu
Copy link
Contributor

hilaolu commented Jan 19, 2025

It still repro. I am on macOS v12.

@hilaolu
Copy link
Contributor

hilaolu commented Feb 4, 2025

Ok, I may figured out the cause and give a solution.

Here are the debug code to tell what happend.
Image

Step to reproduce.

1.Create several windows.
2.Close the oldest window.
3.Create a new window.

The tab_id of new window is simply allocated by the total number of all existing windows, which collisions with the newest one. Thus, the new window with collision tab_id actually becomes a new tab.

Image

All windows should be allocated a unique tab_id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants