r114265 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114264‎ | r114265 | r114266 >
Date:13:52, 20 March 2012
Author:jdlrobson
Status:ok
Tags:
Comment:
never hide clear search link

otherwise the design looks unbalanced
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/beta_opensearch.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/beta_opensearch.js
@@ -67,9 +67,6 @@
6868 if ( focused ) {
6969 focused = false;
7070 }
71 - if ( clearSearch ) {
72 - clearSearch.style.display = 'none';
73 - }
7471 }
7572
7673 function whichElement( e ) {
@@ -204,19 +201,9 @@
205202 function initClearSearch() {
206203 var clearSearch = document.getElementById( 'clearsearch' ),
207204 search = document.getElementById( 'search' );
208 - function handleClearSearchLink() {
209 - if ( clearSearch ) {
210 - if ( search.value.length > 0 ) {
211 - clearSearch.style.display = 'block';
212 - } else {
213 - clearSearch.style.display = 'none';
214 - }
215 - }
216 - }
217205
218206 function clearSearchBox( event ) {
219207 search.value = '';
220 - clearSearch.style.display = 'none';
221208 event.preventDefault();
222209 }
223210
@@ -224,7 +211,6 @@
225212 search.select();
226213 }
227214 u( clearSearch ).bind( 'mousedown', clearSearchBox );
228 - u( search ).bind( 'keyup', handleClearSearchLink );
229215 u( search ).bind( 'click', onFocusHandler );
230216 }
231217

Status & tagging log