问题描述:

I am having an issue on iPhone 6's only where I have forms that pop up in a lightbox and when an input is clicked on the lightbox jumps down the page out of view. After you begin to type the lightbox jumps back into view and will stay in place for any successive inputs that are filled out.

This can be tested here, Just cliack any of the green boxes under "Quick Links" and you will see.

Has anyone ran into this issue and if so is there a decent solution? CSS? Javascript? Anything?

I've tried all kinds of hacks and nothing is working. It works fine on iPhone 5 and before. I don't get it.

网友答案:

From my inspection its a CSS issue. Your top level lity <div> has top, left, right, bottom: 0 - that will make it the entire height of the website (about 5000px) - what you actually want is for it to be the height of the viewport (about 600px depending on device). Remove bottom:0, add height:100vh; in CSS the top level .lity-iframe <div> and also to the .lity-wrap <div> - also that div probably doesn't need to be position:fixed, since it's already inside the position:fixed; lity-iframe <div>

That should work.

相关阅读:
Top