How to show a popover while retaining focus?

How can I show a popover without giving focus to it?

Use case: I want to use it inside my editor for visual autocompleting feedback. :slight_smile:

Please keep us updated on how the autocomplete goes. Iโ€™m trying to figure out how to implement an autocomplete input and was considering ion-popover as well.

Does it work as expected if you set keyboardClose to false when creating your popover? The API for this is not very clear, so we are looking into ways to improve this.

1 Like

Setting keyboardClose to false did solve the issue, thanks for the tip!

Iโ€™m testing using a popover for a single-item autocomplete suggestion and itโ€™s working alright. Main issue is when you tap the item in the popover to set it as the input value, focus goes from the input to the popover then back to the input after the popover closes, which causes the iOS keyboard to cycle from shown to hidden to shown and looks a bit buggy. Will report if Iโ€™ve figured out a solution and am open to suggestions in the meantime.

1 Like

Glad it works! We are looking into ways to give developers better control over the focus behavior with overlays, so this context is really helpful.