viewport autoMaximize cause超时等待window.innerHeight在iPhone上更改 [英] viewport autoMaximize causes Timeout waiting for window.innerHeight to change on iPhone

查看:146
本文介绍了viewport autoMaximize cause超时等待window.innerHeight在iPhone上更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序有一个问题,因为我们试图在屏幕上获得尽可能多的房地产,因此在不使用时试图隐藏地址栏。



我可以通过将autoMaximize值设置为true来实现此目的。我的问题是当我导航到这个页面时,我得到一个错误超时等待window.innerHeight更改。



当这个错误显示我有一个白色的页面在我的手机但是如果我按下刷新按钮,它将实际加载该页面。



我试图使用全屏面板作为大多数文档解释,但这不会隐藏地址栏



这是完全削减,但我甚至得到以下代码的错误:

  Ext.Application({


launch:function(){

Ext.Viewport.add({
xtype :'panel',
fullscreen:true,
html:'dfghdfgsd'
});

},
viewport:{
autoMaximize:true
}
});

我不太清楚如何解释这个问题最好,因为我尝试过这么多不同的方法梳理出来。只是希望有人遇到类似的东西?

解决方案

对于在iOS上运行PhoneGap + Touch的用户, autoMaximize 应始终设置为FALSE / Sencha员工的评论这个线程(链接到Sencha论坛)。



我仍然在Touch 2.3.0(2013年10月)看到这个问题,所以我添加了这样的逻辑:

  name:'MyApp',
viewport:{
autoMaximize:(typeof(Ext.browser。 is.PhoneGap)==='undefined'||!Ext.browser.is.PhoneGap)
}
});


I have a problem with my app in that we are trying to get as much real estate on the screen as possible and therefore trying to hide the address bar when it is not in use.

I can achieve this by setting the autoMaximize value to true. My problem is when I navigate to this page I get an error Timeout waiting for window.innerHeight to change.

When this error is show I have a white page on my phone but if I then press the refresh button it will actually load the page.

I have attempted to use a fullscreen panel as most docs explain but this will not hide the address bar.

This is completely cut down but I am even getting the error with the following code:

Ext.Application({


launch:function(){

    Ext.Viewport.add({
        xtype:'panel',
        fullscreen:true,
        html:'dfghdfgsd'
    });

},
viewport:{
    autoMaximize: true
}
});

I'm not exactly sure how to explain this issue best because I have tried so many different ways to sort it out. Just hoping someone has came across something similar?

解决方案

For anyone running PhoneGap + Touch on iOS, autoMaximize should always be set to FALSE per a Sencha employee comment on this thread (links to the Sencha forum).

I'm still seeing this issue with Touch 2.3.0 (Oct 2013), so I've added logic like this:

   Ext.application({
     name: 'MyApp',
     viewport: {
       autoMaximize: (typeof(Ext.browser.is.PhoneGap) === 'undefined' || !Ext.browser.is.PhoneGap)
     }
   });

这篇关于viewport autoMaximize cause超时等待window.innerHeight在iPhone上更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆