Marvin Herbold
Member
When placed in an iframe, XenForo misbehaves when viewed on an iOS device.
Whenever we try to compose a post on XF on the iPhone the screen jumps to the top whenever we hit the space key.
On Windows, Mac OS X, and Android all this works perfectly fine. On iOS only, writing a post will make the screen scroll to the top whenever you hit the space key (and sometimes other keys too).
In the previous version of XF that we were using 1.4.something the problem was even worse - it would bounce back and forth between top of screen and the editor window on every key stroke. In 1.5 now it just goes to the top of the screen and stays there.
To test this for yourself, create a "test.html" file and put your own community forums in an iframe. Writing posts in the forums will no longer work correctly on iOS. Here is the code:
<!DOCTYPE html>
<html style="height:100%;">
<head>
<title>XenForo in iFrame</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body style="position:relative; margin:0; height:100%; overflow:hidden;">
<div style="position:absolute; top:0; right:0; left:0; bottom:0; overflow:auto; -webkit-overflow-scrolling:touch;">
<iframe style="box-sizing:border-box; width:100%; height:100%; border:none;" src="https://xenforo.com/community/">
</iframe>
</div>
</body>
</html>
Whenever we try to compose a post on XF on the iPhone the screen jumps to the top whenever we hit the space key.
On Windows, Mac OS X, and Android all this works perfectly fine. On iOS only, writing a post will make the screen scroll to the top whenever you hit the space key (and sometimes other keys too).
In the previous version of XF that we were using 1.4.something the problem was even worse - it would bounce back and forth between top of screen and the editor window on every key stroke. In 1.5 now it just goes to the top of the screen and stays there.
To test this for yourself, create a "test.html" file and put your own community forums in an iframe. Writing posts in the forums will no longer work correctly on iOS. Here is the code:
<!DOCTYPE html>
<html style="height:100%;">
<head>
<title>XenForo in iFrame</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body style="position:relative; margin:0; height:100%; overflow:hidden;">
<div style="position:absolute; top:0; right:0; left:0; bottom:0; overflow:auto; -webkit-overflow-scrolling:touch;">
<iframe style="box-sizing:border-box; width:100%; height:100%; border:none;" src="https://xenforo.com/community/">
</iframe>
</div>
</body>
</html>