Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/javascripts/beta_opensearch.js |
— | — | @@ -27,23 +27,27 @@ |
28 | 28 | var ol = new Object(); |
29 | 29 | search.onfocus = function() { |
30 | 30 | if ( !focused ) { |
| 31 | + content.style.display = 'none'; |
| 32 | + footer.style.display = 'none'; |
31 | 33 | ol.sqLeft = sq.offsetLeft; |
32 | 34 | ol.sqTop = sq.offsetTop; |
33 | 35 | sq.style.position = 'absolute'; |
34 | 36 | |
| 37 | + if ( !ol.properOffsetWidth ) { |
| 38 | + ol.properOffsetWidth = search.offsetLeft + 44; |
| 39 | + } |
| 40 | + |
| 41 | + sq.className = ''; |
35 | 42 | sq.style.left = sb.offsetLeft + pixels; |
36 | 43 | sq.style.top = sb.offsetTop + pixels; |
37 | 44 | sq.style.height = sb.offsetHeight + pixels; |
38 | 45 | sq.style.width = sb.offsetWidth + pixels; |
39 | | - |
40 | | - sq.className = 'animate'; |
41 | | - |
42 | 46 | sq.style.left = 0 + pixels; |
43 | 47 | sq.style.top = 0 + pixels; |
44 | 48 | sq.style.height = 40 + pixels; |
45 | 49 | sq.style.width = document.body.clientWidth + pixels; |
46 | 50 | search.style.position = 'absolute'; |
47 | | - search.style.left = ( search.offsetLeft + 44 ) + pixels; |
| 51 | + search.style.left = ol.properOffsetWidth + pixels; |
48 | 52 | search.style.height = 34 + pixels; |
49 | 53 | search.style.width = ( document.body.clientWidth - 90 ) + pixels; |
50 | 54 | search.style.fontSize = 16 + pixels; |
— | — | @@ -51,8 +55,6 @@ |
52 | 56 | results.style.top = ( sq.offsetTop + sq.offsetHeight ) + pixels; |
53 | 57 | results.style.width = document.body.clientWidth + pixels; |
54 | 58 | results.style.minHeight = '100%'; |
55 | | - content.style.display = 'none'; |
56 | | - footer.style.display = 'none'; |
57 | 59 | results.style.borderTop = 'solid 1px #A6A6A6'; |
58 | 60 | results.style.backgroundColor = '#E6E6E6'; |
59 | 61 | results.style.paddingTop = 5 + pixels; |
— | — | @@ -88,8 +90,6 @@ |
89 | 91 | if ( sq ) { |
90 | 92 | logo.style.visibility = 'visible'; |
91 | 93 | goButton.style.visibility = 'visible'; |
92 | | - //var reg = new RegExp('(\\s|^)animate(\\s|$)'); |
93 | | - //sq.className = sq.className.replace(reg, ''); |
94 | 94 | sq.className = 'divclearable'; |
95 | 95 | sq.style.position = 'static'; |
96 | 96 | sq.style.left = ol.sqLeft + pixels; |
— | — | @@ -175,6 +175,11 @@ |
176 | 176 | results.style.width = ( sq.offsetWidth - 2 ) + pixels; |
177 | 177 | results.style.left = sq.offsetLeft + pixels; |
178 | 178 | results.style.top = ( sq.offsetTop + sq.offsetHeight ) + pixels; |
| 179 | + if ( results.style.display == 'block' ) { |
| 180 | + focused = false; |
| 181 | + search.blur(); |
| 182 | + search.focus(); |
| 183 | + } |
179 | 184 | } |
180 | 185 | } |
181 | 186 | } |
— | — | @@ -187,7 +192,7 @@ |
188 | 193 | case -90: |
189 | 194 | case 90: |
190 | 195 | case 180: |
191 | | - setTimeout( "updateSearchWidth()", 200 ); |
| 196 | + setTimeout( "updateSearchWidth()", 300 ); |
192 | 197 | break; |
193 | 198 | } |
194 | 199 | } |
Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/stylesheets/beta_common.css |
— | — | @@ -98,9 +98,6 @@ |
99 | 99 | display: none; |
100 | 100 | background-color: #ffffff; |
101 | 101 | border-top: none; |
102 | | - border-left: 1px solid #888; |
103 | | - border-right: 1px solid #888; |
104 | | - border-bottom: 1px solid #888; |
105 | 102 | z-index: 2; |
106 | 103 | position: absolute; |
107 | 104 | } |
— | — | @@ -150,19 +147,6 @@ |
151 | 148 | border: 0px solid; |
152 | 149 | } |
153 | 150 | |
154 | | -#sq { |
155 | | -/* background-color: #ff0000;*/ |
156 | | -} |
157 | | - |
158 | | -#sq.animate { |
159 | | - -webkit-transition: all .3s ease-in 100ms; |
160 | | -/* background-color: #0000ff;*/ |
161 | | -} |
162 | | - |
163 | | -#searchbox { |
164 | | -/* background-color: #00ff00;*/ |
165 | | -} |
166 | | - |
167 | 151 | .divclearable { |
168 | 152 | border: 1px solid #888; |
169 | 153 | display: -moz-inline-stack; |