From: prageck Date: Fri, 19 Apr 2013 19:26:37 +0000 (+0530) Subject: Fixed Bug 40464 Placeholder attribute of searchInput element X-Git-Tag: 1.31.0-rc.0~19923^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=b5d3efd430263a7dd11aa455ea590a5d348ead83;p=lhc%2Fweb%2Fwiklou.git Fixed Bug 40464 Placeholder attribute of searchInput element 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 --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 17ec88aead..a5709ead94 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -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 ); diff --git a/resources/mediawiki/mediawiki.searchSuggest.js b/resources/mediawiki/mediawiki.searchSuggest.js index 2bc7cea9eb..516c58f8be 100644 --- a/resources/mediawiki/mediawiki.searchSuggest.js +++ b/resources/mediawiki/mediawiki.searchSuggest.js @@ -196,11 +196,6 @@ 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: {