-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Switch to Unsaved Tab When Prompting to Save #17552
Comments
I will take a stab at this :) |
In addition to this it would be great if all saved files will be closed automatically even if you press cancel |
This works as expected on Widows. On macOS, the untitled editor is not revealed. |
@kieferrm any steps to reproduce? |
I speculate that @kieferrm tried to verify this on yesterdays insider build but the fix is only in todays insider build. |
@bpasero I just retried on the latest insider and it's working fine. It still puzzles me though, since when I saw the discrepancy between the platforms I compared the build ids and commit ids and they were the same. |
@kieferrm well there is actually a timing issue with my fix because opening a modal dialog (like the one you get when you are asked to save the file before closing) stops the entire JS process and rendering. So, if the dialog manages to get into the way of me trying to reveal the editor that is to be saved, you will not see the current editor getting revealed in time. For that I do a bit of trickery where I wait for 2 request animation frames before showing the modal dialog. In my testing I could not get the issue you describe but I am also thinking that it might still happen if the renderer is slow doing rendering... |
I see the Unsaved tab before the dialog shows up. |
Steps to Reproduce:
I think the 'Do you want to save the changes you made to Untitled-1?' should switch to the appropriate tab (in this case tab B) to show the user the contents before they decide to delete them forever.
The text was updated successfully, but these errors were encountered: