You save a note, immediately close the tab, and instead of the tab closing you see a browser-native dialog asking "Leave site?" or "Reload site?". That dialog is not a bug, and it is not something you need to override every time it appears. This article explains what it means, where the time window comes from, and the situations in which the app deliberately suppresses the prompt so you do not get asked twice.
What you will see
Each browser shows its own wording. The dialog is browser-native, not styled by the app:
- Chrome / Edge / Brave: Leave site? Changes you made may not be saved. — with Leave and Cancel buttons.
- Firefox: This page is asking you to confirm that you want to leave — data you have entered may not be saved.
- Safari (desktop): Are you sure you want to leave this page?
There is no logo, no app colour, no button labelled "Notes In Confidence" — that is how browsers present beforeunload prompts and you cannot change it. The phrasing is the browser's standard wording for "the page asked us to make sure you really meant to leave".
Why it appears
Notes In Confidence saves to your local IndexedDB the moment you click Save note. Saving to your hidden Google Drive folder is a separate step that runs in the background, debounced about thirty seconds after the last local change so that fast typing does not produce a flood of small uploads. While that thirty-second window is open, your most recent edit exists only in this browser — and one cleared cache, private-window, or never-returned-to-tab is enough to lose it permanently.
The app installs a guard that watches for this exact situation: if you try to close the tab, refresh the page, or navigate away while the sync engine is in any of these states — dirty (a change waiting to be pushed), uploading (a push currently in flight), error, offline — the browser shows its Leave site? dialog. The user has two choices.
- Cancel / Stay. The page stays. The sync engine has a few seconds to finish its push. Once the engine state goes back to synced the prompt will not appear again on the next close.
- Leave. The tab closes. Your local IndexedDB still has the edit — it has been saved to this browser since the moment you clicked Save note. The change pushes to Drive on the next unlock of this same browser on this same device. The risk only materialises if you do not return to this browser before, for example, switching devices or clearing browser data.
Verifying for yourself
If you want to see what the sync engine is doing, open Advanced > Drive and scroll to Recent sync activity. The All tab shows every push, pull, retry and error in time order. The article Reading the Recent sync activity panel covers what each event kind means. Once the most recent entry is push-ok, you can close the tab with no prompt and no risk.
When the prompt does not appear, by design
There are three situations where Notes In Confidence deliberately suppresses the Leave site? dialog so the user is not asked to confirm an action they already confirmed:
The idle auto-lock. When the 15-minute force-lock timer fires, the app navigates to the unlock screen automatically. There is no value in prompting the user to confirm — they are not at the keyboard. The lock path tells the sync engine suppress the next unload prompt before it triggers the navigation. Any unflushed edits stay in this browser's IndexedDB and push on next unlock. The article The Lock button, idle lock, and what gets flushed before locking covers this flow.
The Danger Zone delete flows. Delete Local Vault and Delete Local and Google Vault both download a pre-flight encrypted backup first and then navigate to the setup screen. Because the user has already typed DELETE (or delete everything) into a typed-confirmation dialog inside the app, there is no need to ask them a second time via the browser's native prompt. The Danger Zone path suppresses the next unload prompt before its location.replace.
Clicking Reload on the yellow update banner. When you click Reload to pick up a new version of the app, the reload path flushes pending Drive sync first (up to a three-second cap) and then reloads. Because the flush has already happened, there is nothing pending by the time the browser would have asked. The article Banners at the top of the app covers the update banner.
In every other situation — typing Cmd-W, clicking the browser's × on the tab, opening a different URL in this tab, hitting Refresh — the prompt is your safety net.
When you might see the prompt at idle-lock time
You will not, normally. The idle auto-lock fires after 15 minutes of inactivity, and the app suppresses the prompt on that path. If you do see the prompt right after walking away from the keyboard, it almost certainly means a sync was already failing — the engine was in error or offline state before you walked away, and the lock path's suppress signal arrives a fraction of a second after the browser has already decided to show the dialog. Tapping Stay is fine; the lock then completes the next time the app gets a chance.
What to do next
If you keep seeing the prompt and want to know why sync is not finishing, Resolving the read-only banner covers the case where the engine has dropped to read-only because Drive is unreachable, and Reading the Recent sync activity panel lets you read the underlying timeline yourself. If you want to understand the bigger picture of why a 30-second debounce exists at all, Sync, Backup and Local Backup, three different jobs explains the three layers of safety net that the prompt is the last guard for.