I am currently working on an Ionic 4 application and have implemented a popover feature. Within this popover, I want to include an ion-fab-button
that should remain fixed in the top-right corner of the popover.
The snippet of HTML code I have written for this is as follows:
<ion-content>
<ion-fab vertical="top" horizontal="end" slot="fixed">
<ion-fab-button (click)="getStats()">
<ion-icon id="closeBTN" name="stats" color="light">
</ion-icon>
</ion-fab-button>
</ion-fab>
<div>
......
</div>
</ion-content>
Despite my efforts, I have found that the ion-fab-button does not remain fixed as intended but scrolls with the content within the popover. Can someone please advise me on why this might be happening and how I can resolve it?
I have also attempted putting the button inside an ion-header, only to find that the ion-header
also scrolled along with the rest of the popover content. Additionally, using CSS styling like position:fixed
did not yield the desired result.
If anyone has any insights or suggestions on how to address this issue, your help would be greatly appreciated!