ipython/ipython — Issue #1058: New bug: Notebook asks for confirmation to leave even saved pages.
Author: fperez
Created: 2011-11-28 03:07:40+00:00
State: open
Labels: htmlnotebook, prio-blocker, type-bug

@stefanv, this was unfortunately introduced by your changes in #1036, and I didn't notice it initially (we really need an automated test suite for the JS code, badly).

Now, the alert dialog comes up for any closing of a page, even if it was already saved. Furthermore, the message which used to read

```
You have unsaved changes that will be lost if you leave this page.
```

now simply says `true`. I'm going to try to see if I can quickly fix it, but if I can't I'll just revert back the commit (with `git revert`) so we can fix things later. Now I'm worried that there may be other new bugs in the notebook introduced by this which we haven't seen yet.

Lesson learned: never merge again a 'cleanup' on javascript, since its semantics regarding this stuff are so finicky that a supposedly purely stylistic fix can break code.