-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form Inputs in fixed navbar breaks it on iOS 7 #11805
Comments
After researching a bit, it seems to be a common bug in iOS, which doesn't seem to be solved in iOS7. Here you can find out more about this. http://stackoverflow.com/questions/15199072/ios-input-focused-inside-fixed-parent-stops-position-update-of-fixed-elements |
I think this is the same issue that we currently mention in the context of modals: http://getbootstrap.com/getting-started/#mobile-modals |
@cvrebert you are right, didn't notice that. Should this be closed or can we came up with a solution? |
I think we should document it for navbars like we already do for modals. |
Ok. Just for the record of someone looking at this issue, this is the solution I am using right now and is working properly. JS/coffee # iOS FIXED FIX
if Modernizr.touch
$body = $('body')
$(document).on 'focus', 'input', (e)->
$body.addClass('fixfixed')
setTimeout =>
$(document).scrollTop($(this).scrollTop())
, 10
$(document).on 'blur', 'input', (e)->
$body.removeClass('fixfixed') and then in the css/sass body
&.fixfixed
#YOUFIXEDRELEMENT
position: absolute |
👍 |
Hi guys,
I think this issue is the same as issue #9757.
I reproduced it on iOS 7, just having an input on the navbar if the scroll is not at the top, at the moment the keyboard appears, the navbar goes down the same amount the scroll was at.
Thanks.
Ton.
The text was updated successfully, but these errors were encountered: