<p dir="auto">I've encountered a very severe bug (Atom 0.198.0) where if you attempt to close a window with tabs with unsaved changes, and you hit cancel in the warning dialog that appears, it closes the window anyway (presumably <em>without</em> saving).</p>
<p dir="auto">It looks like the same issue as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="32947935" data-permission-text="Title is private" data-url="https://github.com/atom/atom/issues/1989" data-hovercard-type="issue" data-hovercard-url="/atom/atom/issues/1989/hovercard" href="https://github.com/atom/atom/issues/1989">#1989</a>.</p>
<p dir="auto">I'm runing 0.142.0 on Windows 7.</p>
<p dir="auto">I've tracked it down to three 'beforeunload' handlers being called, one of them honoring the Cancel request but only to have its result flag trampled by the third handler. Could not go further for now.</p>
<p dir="auto">It behaves as if "Don't Save" was chosen. <g-emoji class="g-emoji" alias="scream" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f631.png">😱</g-emoji></p>
<p dir="auto">(Dismissing the dialog using the close icon does the same, as you would expect.)</p>