This is related to T49779: Provide a way for the user to switch between VisualEditor and wikitext source editor modes without saving, which reached mw.org a little while ago.
Steps to reproduce:
- Open a page in the wikitext editor.
- Click the new icon in the toolbar to switch to the visual editor.
- (Make some change so that you can save.)
- Save the page. (It works.)
- Click the history tab.
Result: You get an error message that says your change hasn't been saved.
In Safari 9, the error says: "From “www.mediawiki.org”: "Are you sure you want to leave this page? Leaving this page may cause you to lose any changes you have made. If you are logged in, you can disable this warning in the "Editing" section of your preferences". In Firefox 41, the error says: "This page is asking you to confirm that you want to leave - data you have entered may not be saved."
Expected behavior: No error message, because the page was already saved.