Ionic 尝试取消触摸启动事件时忽略控制台错误

gwbalxhn  于 2022-12-08  发布在  Ionic
关注(0)|答案(2)|浏览(170)

当用户滚动collection-repeat长列表时,我在我的离子应用程序中收到此错误。
已忽略取消cancelable = false的touchstart事件的尝试,例如,因为滚动正在进行且无法中断。
知道这是什么吗?
模板:

<div class="scrollContainer">
    <ion-scroll zooming="false" direction="y" overflow-scroll="false">

        <div class="loadingboards" ng-if="!transitionFinished">
            <ion-spinner class="spinner spinner-ios">
            </ion-spinner>
            <br/>
            Loading boards list...
        </div>

        <div id="boardselection" ng-if="transitionFinished">
            <ion-item collection-repeat="item in prodataSelect | orderBy:data.sort | filter: data.selectBrand.brand:true | filter: data.selectName.name | unique:'modelStrict'" item-width="96%" item-height="'18%'">

                <a class="optionfuninit item-content" data-proid="{{item.id}}" ng-click="whatToDo(item.id,$event);" ng-class="item.fun == '0' ? 'aNormal' :( item.fun == '1' ? 'aSmallWave' : (item.fun == '2' ? 'aStepUp' : ''))">
                    <img class="imageoptionsbrand" ng-src="{{ imagesUrls[(item.brand | lowercase | nospace)+'.png'] }}" />
                    <div class="listviewTrophy" ng-if="isWinning(item.id)">
                        <i class="icon ion-trophy"></i>
                        <div class="winningboardtext" translate="computepage.30">Winning Board</div>
                    </div>
                    <i class="icon ion-female" ng-show="item.gender == 'female'"></i>
                    <div class="listviewtexts" ng-class="item.fun == '0' ? 'aNormal' :( item.fun == '1' ? 'aSmallWave' : (item.fun == '2' ? 'aStepUp' : ''))">
                        <span class="listviewtextsmodel">{{item.modelStrict}}</span>
                    </div>
                    <div class="imagebox rotate90rightCenter">
                        <img class="imageoptionsmodel " ng-src="{{imagesUrls[item.imageName]}}" />
                    </div>
                </a>

            </ion-item>
        </div>

    </ion-scroll>
</div>

谢谢

f2uvfpb9

f2uvfpb91#

在vendor.js文件中注解这些行对我很有效

ToggleGesture.prototype.onDragStart = function (ev) {
    /*ev.preventDefault();*/
    this.toggle._onDragStart(Object(__WEBPACK_IMPORTED_MODULE_2__util_dom__["f" /* pointerCoord */])(ev).x);
};
ToggleGesture.prototype.onDragMove = function (ev) {
    /*ev.preventDefault();*/
    this.toggle._onDragMove(Object(__WEBPACK_IMPORTED_MODULE_2__util_dom__["f" /* pointerCoord */])(ev).x);
};
ToggleGesture.prototype.onDragEnd = function (ev) {
    /*ev.preventDefault();*/
    this.toggle._onDragEnd(Object(__WEBPACK_IMPORTED_MODULE_2__util_dom__["f" /* pointerCoord */])(ev).x);
};
u2nhd7ah

u2nhd7ah2#

只需转到ion-datetime 3-ios.entry.js并注解行1383:

detail.event.preventDefault();

您将摆脱错误:
[干预]忽略取消触摸启动事件(cancelable=false)的尝试,例如,因为滚动正在进行且无法中断

相关问题