Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Closing Brackets from the first Brackets window does not prompt the user to save changes in the second Brackets window. #3047

Closed
RaymondLim opened this issue Mar 5, 2013 · 6 comments · Fixed by adobe/brackets-shell#220
Assignees
Milestone

Comments

@RaymondLim
Copy link
Contributor

This is kind of an intermittent issue even though I can reproduce it most of the times.

  1. Open Brackets. If no file is open in the working set, open a file, then shutdown and restart Brackets.
  2. From Debug menu open a second Brackets window.
  3. In the second window you can switch to another project or open a different file. Then type something in the file open in the second window.
  4. Without bringing the original Brackets window to the front, just click on X button of the first Brackets window that is behind the second Brackets window.

Result: Brackets quits and all the changes you made in the second window are lost.

@RaymondLim
Copy link
Contributor Author

Set it low priority since I can reproduce it in Sprint 19 and you need to perform the exact steps to see the issue.

@redmunds
Copy link
Contributor

redmunds commented Mar 6, 2013

This may be related to #3046

@ghost ghost assigned RaymondLim Mar 6, 2013
@peterflynn
Copy link
Member

Reviewed. To Raymond for Sprint 22, medium priority.

NJ was able to repro on Mac too. I can repro semi-consistently on Windows (sometimes clicking close once shows the unsaved prompt in the 2nd window as expected, but if I click close again while that prompt is open, then it repros). We always see #3046 at the same time though.

There are several issues this bug raises. Since this is an unofficial feature, we're just looking for a quick fix band-aid that avoids data loss. We should avoid major re-architecting of the Close workflow.

  • Closing the window on Mac quits the whole process, which it shouldn't. It should be possible to have no windows open. This is not needed as part of this fix; tracked by Make "New Window" a real feature.
  • Closing the first window on Win implies closing all other windows, which maybe it shouldn't. But again, not needed for this fix; tracked by user story above.
  • An action that triggers closing any window should always show the unsaved changes prompt for all windows that it's closing.
  • Closing a window that already has an unsaved changes prompt open should not ignore the prompt. (Fwiw, I can repro this even with just one window open).
  • Shouldn't crash on quit (Ungraceful Exit of New Brackets Window #3046).

@RaymondLim
Copy link
Contributor Author

Closing a single main window with unsaved changes is introduced by pull request #2617 that tries to fix #2616. So I'll be logging a new issue for this case.

@redmunds
Copy link
Contributor

This only happens if there is an existing file open in working set, so updated step 1 of recipe.

@RaymondLim
Copy link
Contributor Author

Fix confirmed.

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

Successfully merging a pull request may close this issue.

3 participants