r101429 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101428‎ | r101429 | r101430 >
Date:23:08, 31 October 2011
Author:preilly
Status:deferred
Tags:
Comment:
1.18wmf1: MFT r101428
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/javascripts/opensearch.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/javascripts/opensearch.js
@@ -59,14 +59,16 @@
6060 }
6161
6262 function updateSearchWidth() {
63 - if ( sq && search && sb && results ) {
 63+ if ( sq && search && sb ) {
6464 var iw = ( document.documentElement.clientWidth ) ? document.documentElement.clientWidth : document.body.clientWidth;
6565 sb.style.width = ( iw - 30 ) + pixels;
6666 sq.style.width = ( iw - 110 ) + pixels;
6767 search.style.width = ( iw - 140 ) + pixels;
68 - results.style.width = ( sq.offsetWidth - 2 ) + pixels;
69 - results.style.left = sq.offsetLeft + pixels;
70 - results.style.top = ( sq.offsetTop + sq.offsetHeight ) + pixels;
 68+ if ( results ) {
 69+ results.style.width = ( sq.offsetWidth - 2 ) + pixels;
 70+ results.style.left = sq.offsetLeft + pixels;
 71+ results.style.top = ( sq.offsetTop + sq.offsetHeight ) + pixels;
 72+ }
7173 }
7274 }
7375

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101428fix on orientation change issuepreilly23:07, 31 October 2011

Status & tagging log