# Autofocus Not working

**URL:** <https://forum.ionicframework.com/t/autofocus-not-working/233647>\
**Category:** Ionic Angular\
**Created:** [May 22, 2023, 11:35am UTC](https://forum.ionicframework.com/t/autofocus-not-working/233647 "2023-05-22T11:35:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azaru](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Azaru](https://forum.ionicframework.com/u/Azaru)\
**Post date:** [May 22, 2023, 11:35am UTC](https://forum.ionicframework.com/t/autofocus-not-working/233647/1 "2023-05-22T11:35:21Z")

</div>

```
  <ion-input
    class="container__input"
    [autofocus]="focus"
    type="text"
    id="tagId"
    name="tagId"
    expand="full"
    placeholder="code"
    [(ngModel)]="tagId"
    (input)="calculateByteLength($event)"
  />
  <ion-input
    class="container__input"
    autofocus="true"
    type="text"
    id="tagId"
    name="tagId"
    expand="full"
    placeholder=" code"
    [(ngModel)]="tagId"
    (input)="calculateByteLength($event)"
  />

```

auto focus not working  
Any solution
