Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Popover issue with positioning

$
0
0

Hi everyone! :slight_smile:

I’m currently implementing my first popover and everything has been working easily and smoothly!
But I’ve noticed an issue with the positioning of the popover in where it opens. Since is send in my $event (MouseEvent) it opens where the pressed element is located and that is almost perfect. But i wonder if there is some way to open in it the pressed elements Y position but float the popover to the right?

The project is in Angular

.TS code

  async presentPopover(event) {
    const popover = await this.popoverController.create({
      component: SuggestionBoxPopover,
      cssClass: 'popover-size',
      translucent: true,
      event: event
    });
    popover.onDidDismiss().then(()=> {
      this.clearPopover();
    });

    return await popover.present();
  }

the CSS

.popover-size {
  max-height: 200px;
}

Thanks for any help! :slight_smile: I’ve already tried with CSS and other solutions, but you never know if there is some easy solution that I’ve missed :slight_smile:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles