Merge "Add missing type to @param documentation"
[lhc/web/wiklou.git] / includes / widget / SearchInputWidget.php
index 0d71629..90792fc 100644 (file)
@@ -21,7 +21,7 @@ class SearchInputWidget extends TitleInputWidget {
        /**
         * @param array $config Configuration options
         * @param int|null $config['pushPending'] Whether the input should be visually marked as
-        *  "pending", while requesting suggestions (default: true)
+        *  "pending", while requesting suggestions (default: false)
         * @param boolean|null $config['performSearchOnClick'] If true, the script will start a search
         *  whenever a user hits a suggestion. If false, the text of the suggestion is inserted into the
         *  text field only (default: true)
@@ -31,7 +31,6 @@ class SearchInputWidget extends TitleInputWidget {
        public function __construct( array $config = [] ) {
                $config = array_merge( [
                        'maxLength' => null,
-                       'type' => 'search',
                        'icon' => 'search',
                ], $config );
 
@@ -56,6 +55,10 @@ class SearchInputWidget extends TitleInputWidget {
                $this->addClasses( [ 'mw-widget-searchInputWidget' ] );
        }
 
+       protected function getInputElement( $config ) {
+               return ( new \OOUI\Tag( 'input' ) )->setAttributes( [ 'type' => 'search' ] );
+       }
+
        protected function getJavaScriptClassName() {
                return 'mw.widgets.SearchInputWidget';
        }