Disable the Special:Preferences 'Save' button if no
settings have been changed (uses keydown and mousedown
events as an alternative to change event, so is not perfect)
This prevents unnecessary saving when you can't remember
if you saved the settings or not.
Bug: T89457
Change-Id: I7c2e11302099280c561e435425b23afb9fb760b5
$preftoc.append( $li );
} );
+ // Disable the button to save preferences unless preferences have changed
+ $( '#prefcontrol' ).prop( 'disabled', true );
+ $( '.prefsection' ).one( 'change keydown mousedown', function () {
+ $( '#prefcontrol' ).prop( 'disabled', false);
+ } );
+
// Enable keyboard users to use left and right keys to switch tabs
$preftoc.on( 'keydown', function ( event ) {
var keyLeft = 37,