mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-18 04:06:19 +00:00
fix: overview search bar scrolling behind header
This commit is contained in:
@@ -86,11 +86,6 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Offset from search bar to top
|
||||
*/
|
||||
searchToTopOffset = 0;
|
||||
|
||||
constructor(
|
||||
private readonly dataRoutingService: DataRoutingService,
|
||||
private scheduleProvider: ScheduleProvider,
|
||||
@@ -134,11 +129,6 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
}
|
||||
|
||||
ionViewDidEnter() {
|
||||
this.searchToTopOffset =
|
||||
this.searchRef.nativeElement?.getBoundingClientRect().top - 100;
|
||||
}
|
||||
|
||||
async loadNextEvent() {
|
||||
const dataSeries = await this.scheduleProvider.getDateSeries(
|
||||
this.uuids,
|
||||
@@ -162,13 +152,6 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
async onSearchBarFocus(_event: Event) {
|
||||
this.ionContentRef.getScrollElement().then(element => {
|
||||
if (
|
||||
element.scrollHeight - element.clientHeight >=
|
||||
this.searchToTopOffset
|
||||
) {
|
||||
this.ionContentRef.scrollToPoint(0, this.searchToTopOffset, 100);
|
||||
}
|
||||
});
|
||||
this.ionContentRef.scrollToTop(100);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user