Don't ignore autofocus in HTMLForm
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Mon, 20 Jul 2015 04:26:39 +0000 (06:26 +0200)
committerFlorian <florian.schmidt.stargatewissen@gmail.com>
Mon, 20 Jul 2015 04:26:39 +0000 (06:26 +0200)
Autofocus needs to be boolean true to work in OOUI (empty string is interpreted
as false), and it's working in div layout, too, so there is no need to transform
it into a string.

Change-Id: I8cb57e0b701c7bc07e75ae60ecd98911ac37d30f

includes/htmlform/HTMLFormField.php

index 70615d9..21526c7 100644 (file)
@@ -874,7 +874,7 @@ abstract class HTMLFormField {
         * @return array Attributes
         */
        public function getAttributes( array $list, array $mappings = null ) {
-               static $boolAttribs = array( 'disabled', 'required', 'autofocus', 'multiple', 'readonly' );
+               static $boolAttribs = array( 'disabled', 'required', 'multiple', 'readonly' );
 
                $ret = array();
                foreach ( $list as $key ) {