Fixed Bug 40464 Placeholder attribute of searchInput element
authorprageck <prageck@gmail.com>
Fri, 19 Apr 2013 19:26:37 +0000 (00:56 +0530)
committerprageck <prageck@gmail.com>
Sun, 21 Apr 2013 14:31:13 +0000 (20:01 +0530)
Removed the javascript code that sets the placeholder of #searchInput element.
Now the placeholder attribute of #searchInput element is set only in the original HTML.
On browsers that do not support placeholder attribute, placeholder.js will insert
the appropriate placeholder.

Bug: 40464
Change-Id: I6496716f2bd25307004ba16bceadca4c6723a5db

includes/SkinTemplate.php
resources/mediawiki/mediawiki.searchSuggest.js

index 17ec88a..a5709ea 100644 (file)
@@ -1804,6 +1804,7 @@ abstract class BaseTemplate extends QuickTemplate {
                $realAttrs = array(
                        'type' => 'search',
                        'name' => 'search',
+                       'placeholder' => wfMessage( 'searchsuggest-search' )->text(),
                        'value' => isset( $this->data['search'] ) ? $this->data['search'] : '',
                );
                $realAttrs = array_merge( $realAttrs, Linker::tooltipAndAccesskeyAttribs( 'search' ), $attrs );
index 2bc7cea..516c58f 100644 (file)
                        return;
                }
 
-               // Placeholder text for search box
-               $searchInput
-                       .attr( 'placeholder', mw.msg( 'searchsuggest-search' ) )
-                       .placeholder();
-
                // Special suggestions functionality for skin-provided search box
                $searchInput.suggestions( {
                        result: {