Ionic framework 为什么ion refresher和ion infinite滚动会导致滚动到顶部?
我有一个应用程序在离子5,在mnia页面我有一个离子刷新和离子无限滚动同时工作的列表。 使用刷新器更新列表后,如果我到达列表的底部,将触发意外的向顶部滚动。 如何消除这种不必要的行为 是否存在两个组成部分冲突的机制 htmlIonic framework 为什么ion refresher和ion infinite滚动会导致滚动到顶部?,ionic-framework,ion-infinite-scroll,Ionic Framework,Ion Infinite Scroll,我有一个应用程序在离子5,在mnia页面我有一个离子刷新和离子无限滚动同时工作的列表。 使用刷新器更新列表后,如果我到达列表的底部,将触发意外的向顶部滚动。 如何消除这种不必要的行为 是否存在两个组成部分冲突的机制 html {{'newsList.allSegment'| translate}} {{'newsList.favorites'| translate}} {{filtersForm.get('topics').value.length} {{'newsList.noPublic
{{'newsList.allSegment'| translate}}
{{'newsList.favorites'| translate}}
{{filtersForm.get('topics').value.length}
{{'newsList.noPublicNews'| translate}}
{{news1.publishDate}日期:'dd-MMMM-yyyy'}
{{news1.topic}
{{news1.title}
{{news1.topic}
{{news1.publishDate}日期:'dd-MMMM-yyyy'}
<ion-header>
<lea-page-header [detailPage]="false"></lea-page-header>
</ion-header>
<ion-content>
<!-- Header con ricerca -->
<div class="news-list-header">
<ion-toolbar *isLogged>
<ion-segment (ionChange)="changeTab($event)" value="all" mode="md">
<ion-segment-button value="all">{{ 'newsList.allSegment' | translate }}
</ion-segment-button>
<ion-segment-button value="favorites">{{ 'newsList.favorites' | translate }}
</ion-segment-button>
<hr>
</ion-segment>
</ion-toolbar>
<ion-toolbar>
<div class="filters">
<form [formGroup]="filtersForm">
<ion-searchbar name="searchValue"
formControlName="searchValue"
inputmode="search"
mode="ios"
placeholder="{{ 'newsList.search' | translate }}"
(ionClear)="removeKeyboard()"
(ionCancel)="removeKeyboard()"
(keyup)="onKey($event)">
</ion-searchbar>
</form>
<div *isLogged class="filter-btn">
<button class="lea-btn btn-primary ion-activatable ripple-parent" (click)="presentFilterModal()">
<span>
<ion-icon name="options-outline"></ion-icon>
</span>
<ion-ripple-effect></ion-ripple-effect>
</button>
<ion-badge *ngIf="filtersForm.get('topics').value.length > 0">
{{ filtersForm.get('topics').value.length }}</ion-badge>
</div>
</div>
</ion-toolbar>
</div>
<ion-refresher slot="fixed"
(ionRefresh)="doRefresh($event)">
<ion-refresher-content></ion-refresher-content>
</ion-refresher>
<!-- Se non ci sono news pubbliche -->
<div class="ion-text-center ion-margin-top" *ngIf="noPublicNews && !news.length && !filtersForm.value.searchValue">
<ion-chip>
<ion-label>{{ 'newsList.noPublicNews' | translate }}</ion-label>
</ion-chip>
</div>
<!-- Lista news -->
<ion-list class="news-list"
*ngIf="(favourite ? newsFavourite : news).length && !isSearching"
lines="none">
<ion-card *ngFor="let news1 of (favourite ? newsFavourite : news); index as i"
(click)="forward(news1)"
class="news lamboNews ion-activatable ripple-parent"
[ngClass]="{'top-news': news1.topNews, 'blue': news1?.codTopic?.includes('CORPORATE'), 'green': news1?.codTopic?.includes('PEOPLE')}">
<div class="image" [style.background-image]="getSafeURL(news1.rollupURL)"></div>
<ion-card-content>
<div *ngIf="news1.topNews" class="date ion-text-left">
{{ news1.publishDate | date: 'dd MMMM yyyy'}}
</div>
<ion-chip *ngIf="!news1.topNews"
[ngClass]="{'blue': news1?.codTopic?.includes('CORPORATE'), 'green': news1?.codTopic?.includes('PEOPLE')}">
<ion-label>{{ news1.topic }}</ion-label>
</ion-chip>
<div class="title ion-text-left">
{{ news1.title }}
</div>
<div>
</div>
</ion-card-content>
<ion-toolbar>
<ion-chip slot="start"
*ngIf="news1.topNews"
[ngClass]="{'blue': news1?.codTopic?.includes('CORPORATE'), 'green': news1?.codTopic?.includes('PEOPLE')}">
<ion-label>{{ news1.topic }}</ion-label>
</ion-chip>
<div slot="start" *ngIf="!news1.topNews" class="date">
{{ news1.publishDate | date: 'dd MMMM yyyy'}}
</div>
<ion-buttons slot="end" *isLogged>
<ion-button (click)="onSetFavourite(news1)">
<ion-icon *ngIf="news1.favourite" name="star"></ion-icon>
<ion-icon *ngIf="!news1.favourite" name="star-outline"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
<ion-ripple-effect></ion-ripple-effect>
</ion-card>
</ion-list>
<!-- Infinite scroll -->
<ion-infinite-scroll threshold="50px" (ionInfinite)="moreNews($event)">
<ion-infinite-scroll-content
loadingSpinner="bubbles"
[loadingText]="'infiniteScroll.moreDaraLoading' | translate">
</ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
<lea-toolbar-navigation></lea-toolbar-navigation>