Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/275745

Change subject: Ignore name-less inputs on preference page confirmCloseWindow 
check
......................................................................

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
(cherry picked from commit 614dd71670d6d73e3c3aa953f6afadd5b9187936)
---
M resources/src/mediawiki.special/mediawiki.special.preferences.js
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/45/275745/1

diff --git a/resources/src/mediawiki.special/mediawiki.special.preferences.js 
b/resources/src/mediawiki.special/mediawiki.special.preferences.js
index 29322f4..a756f22 100644
--- a/resources/src/mediawiki.special/mediawiki.special.preferences.js
+++ b/resources/src/mediawiki.special/mediawiki.special.preferences.js
@@ -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 ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/275745
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cf27267e60f2077180b7bb6a3bc29fded4b67f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.15
Gerrit-Owner: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: TheDJ <hartman.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to