bootstrap-iOS上没有滚动条? [英] bootstrap - no scrollbars on IOS?

查看:90
本文介绍了bootstrap-iOS上没有滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用引导程序版本2.x,并且在非移动浏览器上使用该应用程序时,滚动条可以正常工作,但是当我使用iOS(iphone 5)浏览时,没有滚动条-尤其是垂直滚动条,我无法触摸在屏幕上滚动-它只是固定的,我不能再向左或向右或向上或向下...

I am using bootstrap version 2.x and when i use the app on a non mobile browser the scrollbars work correctly, however when i browse using iOS (iphone 5) there are no scrollbars -- specially vertical scrollbars and i cannot touch scroll on the screen - its just fixed i cannot more left or right or up or down......

是否需要像其他js库一样启用触摸滚动功能?还是有东西坏了.

Is there something i need to enable for touch scrolling like a different js library? or is there something broken.

我了解到,如果的标签未正确关闭,则可能会发生,但是我的标签已关闭.

I have read that if the tags for are not closed properly this could occur but my tags are closed.

因此,基本上我的所有内容现在都无法看到,除了第一部分之外,因为我无法向下滚动...

So basically all my content is now not visible except for the first portion as i cannot scroll down...

这是一些代码(我正在使用durandal作为SPA)

Here is some code ( i am using durandal as a SPA)

这是我的外壳:

<div>
    <header>
        <!--ko compose: {view: 'nav'} --><!--/ko-->
    </header>
    <section id="content"  class="main container-fluid">
        <!--ko compose: {model: router.activeItem, 
            afterCompose: router.afterCompose, 
            transition: 'entrance'} -->
        <!--/ko-->
    </section>
    <footer>
        <!--ko compose: {view: 'footer'} --><!--/ko-->
    </footer>
</div>

此刻,我删除了所有导航"和页脚"渲染,并且只删除了内容HTML中在一个简单页面中渲染的内容:

at the moment i removed all 'nav' and 'footer' rendering and only something in the content HTML that is rendered in there a simple page:

<section>
 <div>
        <button id="btnrefresh" class="btn btn-info btn-force-refresh pull-right"><i class="icon-refresh"></i> Refresh</button>
         <button id="btnrefresh2" data-bind="click: refresh" class="btn btn-info btn-force-refresh pull-right"><i class="icon-refresh"></i> Data Refresh</button>
        <h3 class="page-title" data-bind="text: title" ></h3>
     <div data-bind="visible: showDetails" style="height:500px;width:50px;background-color:red">

    </div>
     </div>
</section>

这不会在IOS中滚动:(

this will not scroll in IOS :(

推荐答案

对此的答案是,它是基于Durandal的问题.

The answer to this was that it as a Durandal based problem.

经过严格的调试并清除了durandal之外的所有内容,我发现可以通过打开durandal/app.js并注释掉以下代码行来解决此问题:

After severe debugging and stripping everything out except durandal i figured out this can be fixed by opening up durandal/app.js and commenting out the following lines of code:

adaptToDevice: function() {
    //document.ontouchmove = function (event) {
    //    event.preventDefault();
    //};
}

欢呼

这篇关于bootstrap-iOS上没有滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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