Last modified: 2011-12-15 18:59:06 UTC
Steps to reproduce: 1. Log in as an user with editor-rights. 2. Enable EditWarning ("Warn me when I leave an edit page with unsaved changes" in the editing-tab in your preferences). 3. Edit a page in a flagged namespace. 4. Leave without saving. Expected result: A warning should pop up, asking whether you really want to leave without saving. Actual result: Nothing happens, you just leave the page. Since it works for non-editors and with pages that can't be flagged this is a bug in FR, probably the beforeunload handler is overridden.
The only unload bind is: // Flag users as "no longer reviewing" on navigate-away $( window ).bind( 'beforeunload', function( e ) { if ( FlaggedRevsReview.isUserReviewing == 1 ) { FlaggedRevsReview.deadvertiseReviewing(); } } ); This should support multiple bindings (using jQuery).
Actually, editWarning does: window.onbeforeunload = fallbackWindowOnBeforeUnload; Maybe it should use bind(). jQuery probably overrides handlers done the old way to replace it with it's own handler that triggers all the bind()ed functions.
Fixed in r106356. Not live.