0

我正在使用 Ionic 框架构建一个 Cordova 项目。该应用程序基本上是用于查看内容。我只是在页面上加载和附加 html 文本,用户滚动浏览它以进行阅读。我遇到了非常奇怪的行为;当有大量文本并且用户尝试滚动时,除非他在背景上滚动,否则滚动不起作用。如果他碰巧先点击了文本,滚动将不起作用。它必须位于内容的白色“不可见”部分。

我花了 2 天时间试图调试这个问题。它适用于桌面浏览器(调试时)但不适用于设备,我使用 Galaxy s4 mini 进行测试。这可能是我的设备特有的问题吗?同样,这仅在页面上有大量文本时才会发生。

编辑这是包含离子含量的部分的代码

<ion-side-menu-content drag-content="false" ng-init="searchOb={enabled:false}">
            <ion-header-bar class="bar-dark" ng-controller="ReaderCtrl" ng-init="init()"
                            ng-show="!searchOb.enabled">
                <div class="buttons">
                    <button class="button ion-arrow-left-a" ng-if="config.mode!='bundle'"
                            ng-click="backClicked()"></button>
                    <div class="coverImgContainer thumbnail floatLeft"
                         style="width:30px; height:37px; margin-right:5px">
                        <img class="portrait" ng-src="{{data.epub.book|coverPath}}"/>
                    </div>
                </div>
                <button class="button icon-right ion-android-dropdown button-clear" ng-click="chapterClicked()">
                    {{data.book.chapter.title}}
                </button>
                <h1 class="title"></h1>

                <div class="buttons">
                    <a ui class="button icon button-icon ion-search" ng-click="searchOb.enabled=true"></a>
                    <a ui class="button icon button-icon ion-android-drawer" ng-click="menuClicked()"></a>
                </div>
            </ion-header-bar>
            <searchHeader searchid="searchOb" onsearch="searchContent(key)"></searchHeader>

            <pageOptions ng-controller="PageOptionsCtrl" ng-init="init()"></pageOptions>
            <ion-content ng-controller="ContentCtrl" class="contentContainer ebook-content has-header has-footer"
                         ng-init="init()"
                         on-release="mouseUp()" ng-mousemove="mouseMove()" on-scroll="scroll()"
                         on-swipe-right="onSwipeRight()" on-swipe-left="onSwipeLeft()" scroll="true"
                         delegate-handle="content" padding="true" autoscroll="false"
                         has-bouncing="true" id="epubContainer">

                <div ng-bind-html="data.book.chapter.content"></div>

                <ion-refresher ng-if="chapterIndex>0" pulling-text="Previous Chapter.."
                               on-refresh="refresher()"></ion-refresher>
            </ion-content>
            <nextChapterScroll></nextChapterScroll>

        </ion-side-menu-content>
4

0 回答 0