Skip to content

Tabs, auto-save, and recovery

Molkit holds several open documents at once, one in each tab. Each tab is an independent document with its own canvas, undo history, and settings. While you work, Molkit keeps a copy of all open tabs in your browser’s storage, so if the browser closes or crashes, your tabs come back the next time you open the app. This copy lives in one browser on one device. It does not sync, and it does not replace saving a .mkit file to disk.

The tab bar sits below the toolbar. Each tab shows its filename. New documents are named Untitled 1, Untitled 2, and so on, reusing the lowest free number.

A new tab starts with the structure preset and color scheme that you applied most recently. Until you choose others, new tabs use the Traditional preset and the Black & White scheme. The browser remembers these two choices between sessions. See Structure presets and Color schemes.

A dot after the filename shows the tab’s save state:

Dot Meaning
Accent color The tab has changes that are not in a file on disk. The browser tab’s title also starts with a bullet.
Amber The last save was a download. Browsers that cannot write to a file on disk, such as Firefox and Safari, save this way. See Saving in browsers that download.
None The tab was saved to its file and has not changed since.
The tab bar with three tabs: sn2-mechanism.mkit with no dot, acid-base.mkit with an amber dot, and the active Untitled 1 with an accent-colored dot and its close button, then the plus button.
Three tabs, one in each save state: saved, last saved as a download, and unsaved.
  • To open a new blank tab, click + at the end of the tab bar, or click File > New. When the current tab is empty and unchanged, File > New reuses it.
  • To switch to a tab, click it.
  • To close a tab, click its close (x) button or middle-click the tab. If the tab has unsaved changes, the Unsaved Changes dialog asks whether to save first, with Don’t Save, Cancel, and Save. If you click Save and then cancel the file picker or the name dialog, the tab stays open.
  • To reorder tabs, drag a tab left or right. To scroll through a long row of tabs, turn the mouse wheel over the tab bar.

Molkit also binds Ctrl+T (new tab), Ctrl+N (File > New), Ctrl+Tab and Ctrl+Shift+Tab (next and previous tab), and Ctrl+1 through Ctrl+9 (tab by position). These keys reach Molkit only when the browser passes them to the page; in most browser windows they open or switch browser tabs instead. Use +, the File menu, and the Molkit tab bar.

Molkit always keeps at least one tab open, so closing the last tab opens a new blank one. Ctrl+W is left to the browser and does not close a Molkit tab.

If you reload or close the page while any tab has unsaved changes, the browser asks you to confirm leaving.

Right-click a tab for these commands:

  • Close Tab
  • Close Other Tabs: keeps only the tab you clicked.
  • Close Tabs to the Right
  • Duplicate Tab: opens a copy of the document in a new tab, marked unsaved.
  • Close All Tabs: closes every tab and opens one blank tab.

If a group of tabs you close contains unsaved changes, Molkit asks you to confirm first.

While a dialog is open on screen, tab actions do nothing, and a message asks you to close the dialog first. Close it, and then switch, create, or close tabs. Dialogs that are hidden or no longer on screen do not block tabs. The LaTeX source editor is an exception: you can switch tabs while it is open, and your draft is kept for when you return.

Auto-save writes every open tab, including its undo history, to your browser’s storage.

Auto-save runs shortly after each change, and again when you switch away from the browser tab or close the page. Selecting, panning, and zooming do not count as changes. For the timings and the two copies it keeps, see How auto-save and recovery work.

Auto-save does not interrupt a text edit in progress. Text you have typed but not committed is saved on the next save after you finish the edit, by clicking away or pressing Esc.

If the browser does not let Molkit save its copy (for example, when the browser’s storage is full), a warning stays on screen, with a Save As button, until a later auto-save succeeds. Save your work to a file right away. Molkit keeps trying on later saves.

All Molkit windows and browser tabs on the same site share one auto-save. If Molkit is open in more than one browser tab or window, a warning appears. Only the window you are working in saves, and edits in one window do not appear in the other. Work in a single window so that it is clear which copy is current.

When you open Molkit, it restores the tabs from the last auto-save, without asking. Recovery runs when at least one saved tab has content, a filename, or unsaved changes, and it selects the tab that was active.

Recovered tabs keep their save state. A tab that had unsaved changes still shows its dot after the reload, still asks before closing, and still triggers the leave-page warning. Molkit counts only a save to a file as saved, so recovered work stays marked unsaved.

If the browser closed partway through an auto-save, a background tab can come back a little older than when you last saw it, but not empty. See How recovery chooses a copy.

In Firefox, each time you save a file, Molkit also keeps a copy of it in the browser’s private storage for this site. On startup, this copy reopens only when auto-save recovery restored nothing: it is skipped if more than one tab is open, if a tab with the same filename exists, or if the active tab already has content. Chrome and Edge write to files on disk, so this recovery does not apply there.

  1. Reopen Molkit in the same browser and the same browser profile. Your tabs come back.
  2. Stay in one Molkit window until you have checked your work. If you open a second window first, the wrong window can become the one that saves.
  3. Look at each tab. Tabs with an accent-colored dot hold work that is not in any file. Save each of them with Ctrl+S or File > Save As.
  4. If a background tab looks older than expected, it was restored from the last complete copy. Redo the missing edits and save.
  5. If nothing comes back, the browser’s site data was cleared, or you were in a private window, which discards its storage when it closes. The .mkit files you saved are then the only copy.

Recovery restores what was in browser storage at the last auto-save. For long-term storage, sharing, or moving between devices, save a .mkit file.