Ignore name-less inputs on preference page confirmCloseWindow check
Ignore any fields that will not be submitted when checking if the user has made changes to the Preferences form. Bug: T122702 Change-Id: I1cf27267e60f2077180b7bb6a3bc29fded4b67f6
This commit is contained in:
parent
899095d980
commit
614dd71670
1 changed files with 3 additions and 2 deletions
|
|
@ -266,7 +266,7 @@
|
|||
|
||||
// Check if all of the form values are unchanged
|
||||
function isPrefsChanged() {
|
||||
var inputs = $( '#mw-prefs-form :input' ),
|
||||
var inputs = $( '#mw-prefs-form :input[name]' ),
|
||||
input, $input, inputType,
|
||||
index, optIndex,
|
||||
opt;
|
||||
|
|
@ -276,7 +276,8 @@
|
|||
$input = $( input );
|
||||
|
||||
// Different types of inputs have different methods for accessing defaults
|
||||
if ( $input.is( 'select' ) ) { // <select> has the property defaultSelected for each option
|
||||
if ( $input.is( 'select' ) ) {
|
||||
// <select> has the property defaultSelected for each option
|
||||
for ( optIndex = 0; optIndex < input.options.length; optIndex++ ) {
|
||||
opt = input.options[ optIndex ];
|
||||
if ( opt.selected !== opt.defaultSelected ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue