Last modified: 2011-12-15 18:59:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T35164, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33164 - FR breaks EditWarning from Extension:Vector
FR breaks EditWarning from Extension:Vector
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
FlaggedRevs (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-15 10:01 UTC by Michael M.
Modified: 2011-12-15 18:59 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Michael M. 2011-12-15 10:01:40 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.
Comment 1 Aaron Schulz 2011-12-15 18:25:32 UTC
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).
Comment 2 Aaron Schulz 2011-12-15 18:30:16 UTC
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.
Comment 3 Aaron Schulz 2011-12-15 18:59:06 UTC
Fixed in r106356. Not live.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links