anyboxhq/everything-okjson

Opening a file with: File -> Open replaces current window content causing loss of data

shames0 opened this issue · 2 comments

Describe the bug
After loading content into an OK JSON window, when using "File -> Open" from the menu-bar to open another JSON document, the content I've already loaded is replaced with the opened document. This causes an unexpected loss of data.

To Reproduce
Steps to reproduce the behavior:

  1. Open OK JSON
  2. Paste content into the window
  3. Click "File" -> "Open", and select a different JSON document to open
  4. See that the previous un-saved content was replaced unexpectedly by the newly opened file with no way to get the previous data back.

Expected behavior
One of two things should happen instead of replacing the unsaved data

  1. The new document should be opened in a new tab
  2. The user should be notified that the existing window content is about to be replaced, and options should be given to either continue, or cancel.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS 13.2.1 (22D68)
  • Browser: N/A - using the OK JSON macOS app
  • Version: Version 1.9.0 (26)

This is intended.

You can choose to open file in new window with Shift + CMD + O. But I do understand it could be unexpected when you lost your data with it.

So in 2.0 you will be able to store the viewing history in your local machine.

Thank you @francisfeng for the info on this and the other issues I opened last week. I'll patiently look forward to 2.0! 🙂