Web page not getting 100% height in Twitter app on iOS 8

后端 未结 2 1243
太阳男子
太阳男子 2021-02-06 07:20

OS: iOS 8.1.1 Browser: Safari Phone: iPhone 5C

We have a web page which takes 100% height and width. We have locked do

2条回答
  •  面向向阳花
    2021-02-06 07:53

    For anyone else coming across this, the fix I ended up using was

        window.addEventListener("resize", function(){
          onResize();
        });
    
        function onResize(){
          document.querySelector("html").style.height = window.innerHeight + "px"
        };
    
        onResize();
    

    this seems to work in the latest version of twitter's browser on safari.

提交回复
热议问题