Last modified: 2009-11-29 15:17:27 UTC
Steps: 1. Enable EditWarning script (UsabilityInitiative/EditWarning/EditWarning.js). 2. Enable preview upon first edit. 3. Edit any page. 4. Attempt to close it without any changes. The problem is that the script checks if the preview element is available, but it should be checking whether the action is "submit". That is: // Check if the current values of some form elements are the same as // the original values if( wgAction == 'submit' || $j( '#wpSummary' ).data( 'origtext' ) != $j( '#wpSummary' ).val() || $j( '#wpTextbox1' ).data( 'origtext' ) != $j( '#wpTextbox1' ).val() ) { ... Rather then currently used: // Check if the current values of some form elements are the same as // the original values if( $j( '#wpTextbox1' ).data( 'origtext' ) != $j( '#wpTextbox1' ).val() || $j( '#wpSummary' ).data( 'origtext' ) != $j( '#wpSummary' ).val() || $j( '#wikiPreview' ).is( ':visible' ) ) { ... BTW. The order of checks is intentional - the check of origtext and wpTextbox1 val is potentially the most time (CPU) consuming and therefore the script should rule out other options first.
Fixed in r59546.