TheDJ has submitted this change and it was merged.

Change subject: Fixed Bug 40464 Placeholder attribute of searchInput element
......................................................................


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
---
M includes/SkinTemplate.php
M resources/mediawiki/mediawiki.searchSuggest.js
2 files changed, 1 insertion(+), 5 deletions(-)

Approvals:
  TheDJ: Verified; Looks good to me, approved



diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index 17ec88a..a5709ea 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -1804,6 +1804,7 @@
                $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 2bc7cea..516c58f 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: {

-- 
To view, visit https://gerrit.wikimedia.org/r/60035
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6496716f2bd25307004ba16bceadca4c6723a5db
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Prageck <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Prageck <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: Waldir <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to