| 133 | |
| 134 | // Attempt to work around a nasty long-standing bug with position: fixed in iOS Safari |
| 135 | // set #wpadminbar to position: absolute while a text field or textarea has focus |
| 136 | // (prevents it from jumping around and even covering the focused field) |
| 137 | if ( /Mobile\/.+Safari/.test(window.navigator.userAgent) ) { |
| 138 | $('input, textarea').focus(function(e){ |
| 139 | $('#wpadminbar').css({left: 0, top: '-28px', position: 'absolute'}); |
| 140 | }).blur(function(e){ |
| 141 | $('#wpadminbar').css({left: '', top: '', position: ''}); |
| 142 | }); |
| 143 | } |