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

Multiple stacked "do you want to save" boxes blocking each other #304

Open
2 tasks done
m1ga opened this issue Jan 5, 2023 · 5 comments
Open
2 tasks done

Multiple stacked "do you want to save" boxes blocking each other #304

m1ga opened this issue Jan 5, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@m1ga
Copy link

m1ga commented Jan 5, 2023

Thanks in advance for your bug report!

  • Have you reproduced this issue in incognito/private browsing?
  • Have you made sure you issue doesn't already exist?

What's your issue?

When closing an editor with an unsaved text tab it will show 4 "do you want to save them" alerts when opening the editor again:
Screenshot_20230105_174759

those are normally stacked on top and sometimes in the wrong order so you can click the visible item to cancel it. You'll have to drag the windows away to find the latest one (that might be a KDE issue). But it should only show one alert!

Which OS/Browser/Version does this happen on?

Fedora Linux 37
Pulsar : 1.100.2022122507
Electron: 12.2.3
Chrome : 89.0.4389.128
Node : 14.16.0

Steps to Reproduce/Additional Details:

  • start Pulsar in a folder
  • ctrl + n for a new file - write some text (don't save it)
  • close pulsar
  • open it again
  • you should see multiple "save" alerts
@m1ga m1ga added the bug Something isn't working label Jan 5, 2023
@bobemoe
Copy link

bobemoe commented Jan 15, 2023

I suspect this is due to they way Pulsar handles restoring unsaved tabs. It can be a bit confusing as there are several different ways this is handled, see #281 (comment) for a summary. I think this "logic" is probably up for review!

As you say you "start Pulsar in a folder" I guess this means you have a project folder open. The way untitled tabs should be handled in this case is silently saved and restored.

I do occasionally (usually when computer being slow) see a "do you want to save" dialogue while I am closing Pulsar in those conditions but the dialogue is just a flash and disappears at the same time the main window closes. It does not reappear upon opening Pulsar but the tabs have been restored.

This leads me to believe Pulsar always shows that dialogue but closes it as soon as the tab is automatically saved. I think you may be right that KDE is interfering somehow as I expect programmatically closing that window is dependant on the Window Manager. I am using Xfce4 here, which may explain why I can't recreate the issue.

Sorry I have no solutions but hopefully I might have provided some clues :) I'll see if I can find the related code.

@m1ga
Copy link
Author

m1ga commented Jan 15, 2023

Thanks for the input.
There was an old Atom bug atom/atom#17459 with almost the same behavior. It wasn't fully fixed as you can see in the last comment in that thread.

"start Pulsar in a folder": I always use the CLI to start my editors. So I run pulsar . in the folder I want to open. Not sure if that is a "project folder" at the end. I don't open multiple projects in one editor. When I run pulsar . in another folder it will open another instance of Pulsar

@bobemoe
Copy link

bobemoe commented Jan 15, 2023

Just tested on clean Pulsar install and pulsar . does indeed open the current directory as a project folder.

With that project folder open, for me multiple untitled tabs are saved and restored silently.

Opening with just pulsar opens with no project folder (must be clean install or previous project folder is opened) and in this case closing with multiple untitled tabs does create multiple stacked save dialogues. However in my case they are stacked in the correct order to be able to click through without having to un-shuffle them.

Some interesting comments in these commits, but they are pretty old so not sure how relevant. f0448ba, 0f6eadc Gives some idea of what code is involved though, but I'm afraid I don't understand it enough to be able to dig much deeper.

@bobemoe
Copy link

bobemoe commented Jan 15, 2023

In you original report it sounds like you only have 1 untitled tab, but see 4 dialogues. Is that correct?

Also, could you confirm if this is also repeatable on the final build of Atom?

@m1ga
Copy link
Author

m1ga commented Jan 15, 2023

In you original report it sounds like you only have 1 untitled tab, but see 4 dialogues. Is that correct?

Also, could you confirm if this is also repeatable on the final build of Atom?

yes to both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants