Unified · Split
| @@ -336,11 +336,21 @@ $.popup = (value) -> · 335 unmodified lines | ||
| 336 | 336 | window.open value.href or value, '_blank' |
| 337 | 337 | return |
| 338 | 338 | |
| 339 | +isMac = null | |
| 339 | 340 | $.isMac = -> |
| 340 | − navigator.userAgent?.indexOf('Mac') >= 0 | |
| 341 | + isMac ?= navigator.userAgent?.indexOf('Mac') >= 0 | |
| 341 | 342 | |
| 343 | +isIE = null | |
| 342 | 344 | $.isIE = -> |
| 343 | − navigator.userAgent?.indexOf('MSIE') >= 0 || navigator.userAgent?.indexOf('rv:11.0') >= 0 | |
| 345 | + isIE ?= navigator.userAgent?.indexOf('MSIE') >= 0 || navigator.userAgent?.indexOf('rv:11.0') >= 0 | |
| 346 | + | |
| 347 | +isAndroid = null | |
| 348 | +$.isAndroid = -> | |
| 349 | + isAndroid ?= navigator.userAgent?.indexOf('Android') >= 0 | |
| 350 | + | |
| 351 | +isIOS = null | |
| 352 | +$.isIOS = -> | |
| 353 | + isIOS ?= navigator.userAgent?.indexOf('iPhone') >= 0 || navigator.userAgent?.indexOf('iPad') >= 0 | |
| 344 | 354 | |
| 345 | 355 | HIGHLIGHT_DEFAULTS = |
| 346 | 356 | className: 'highlight' |
| @@ -41,7 +41,7 @@ class app.views.Search extends app.View · 40 unmodified lines | ||
| 41 | 41 | return |
| 42 | 42 | |
| 43 | 43 | autoFocus: => |
| 44 | − unless app.isMobile() | |
| 44 | + unless app.isMobile() or $.isAndroid() or $.isIOS() | |
| 45 | 45 | @input.focus() unless document.activeElement is @input |
| 46 | 46 | return |
| 47 | 47 | |