Index: trunk/extensions/MobileFrontend/javascripts/opensearch.js |
— | — | @@ -59,14 +59,16 @@ |
60 | 60 | } |
61 | 61 | |
62 | 62 | function updateSearchWidth() { |
63 | | - if ( sq && search && sb && results ) { |
| 63 | + if ( sq && search && sb ) { |
64 | 64 | var iw = ( document.documentElement.clientWidth ) ? document.documentElement.clientWidth : document.body.clientWidth; |
65 | 65 | sb.style.width = ( iw - 30 ) + pixels; |
66 | 66 | sq.style.width = ( iw - 110 ) + pixels; |
67 | 67 | 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 | + } |
71 | 73 | } |
72 | 74 | } |
73 | 75 | |