mw.special.preferences.confirmClose: Handle textareas
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 17 Apr 2018 13:11:59 +0000 (15:11 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Tue, 17 Apr 2018 13:12:10 +0000 (15:12 +0200)
Bug: T192147
Change-Id: Ie02c5d8cab7db091054f7d66633c6ec34354ee19

resources/src/mediawiki.special/mediawiki.special.preferences.confirmClose.js

index 1b8d6d9..1476241 100644 (file)
@@ -26,7 +26,8 @@
                                                        return true;
                                                }
                                        }
-                               } else if ( $input.is( 'input' ) ) { // <input> has defaultValue or defaultChecked
+                               } else if ( $input.is( 'input' ) || $input.is( 'textarea' ) ) {
+                                       // <input> has defaultValue or defaultChecked
                                        inputType = input.type;
                                        if ( inputType === 'radio' || inputType === 'checkbox' ) {
                                                if ( input.checked !== input.defaultChecked ) {