Skip to content

Focus is not working in iOS devices #15317

Closed
@MSAppsDev

Description

@MSAppsDev

What is the expected behavior?

setting focus should work across all devices

What is the current behavior?

its not working in iOS devices.

What are the steps to reproduce?

add a input field into angular reactive form, create a element ref to input field in type script then call
this.inputelementref.nativeElement.focus() in afterViewInit() event of the angular component.

see the sample code
https://stackblitz.com/edit/angular-xpweac

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 5+ (not sure about lower versions), iOS 12+, Safari & Chrome on iOS.

Is there anything else we should know?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions