Skip to content

bug: ionic should not re-focus an element when focus already moved on overlay dismiss by developer #28849

@aeharding

Description

@aeharding

Prerequisites

Describe the Feature Request

Allow developer to set custom focus during overlay dismissal.

Describe the Use Case

In the handler of an ion-action-sheet the developer may want to restore focus to a custom element, like a text box.

Describe Preferred Solution

Ionic overlay should detect whether focus has been set by developer, and not restore focus if that is so.

Describe Alternatives

None.

Reproduction

https://github.com/aeharding/test-focus

Additional Information

Not sure if this is considered a feature or a bug 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions