diff --git a/src/core/components/local-file/core-local-file.html b/src/core/components/local-file/core-local-file.html
index 43d2ba8e1..510727bba 100644
--- a/src/core/components/local-file/core-local-file.html
+++ b/src/core/components/local-file/core-local-file.html
@@ -14,7 +14,7 @@
+ (click)="$event.stopPropagation()" [autofocus]="true" [(ngModel)]="newFileName" *ngIf="editMode">
diff --git a/src/core/components/send-message-form/core-send-message-form.html b/src/core/components/send-message-form/core-send-message-form.html
index 118b9daa2..75d27f779 100644
--- a/src/core/components/send-message-form/core-send-message-form.html
+++ b/src/core/components/send-message-form/core-send-message-form.html
@@ -1,5 +1,5 @@
-
diff --git a/src/core/directives/auto-focus.ts b/src/core/directives/auto-focus.ts
index 1beefc28d..97e715ce6 100644
--- a/src/core/directives/auto-focus.ts
+++ b/src/core/directives/auto-focus.ts
@@ -21,6 +21,8 @@ import { CoreUtils } from '@services/utils/utils';
* Directive to auto focus an element when a view is loaded.
*
* You can apply it conditionallity assigning it a boolean value:
+ *
+ * @deprecated since 3.9.5. ion-input now supports an [autofocus] attribute, please use that one instead.
*/
@Directive({
selector: '[core-auto-focus]',
@@ -39,16 +41,7 @@ export class CoreAutoFocusDirective implements OnInit {
* Component being initialized.
*/
ngOnInit(): void {
- // @todo
- // if (this.navCtrl.isTransitioning()) {
- // // Navigating to a new page. Wait for the transition to be over.
- // const subscription = this.navCtrl.viewDidEnter.subscribe(() => {
- // this.autoFocus();
- // subscription.unsubscribe();
- // });
- // } else {
this.autoFocus();
- // }
}
/**
diff --git a/src/core/features/courses/components/self-enrol-password/self-enrol-password.html b/src/core/features/courses/components/self-enrol-password/self-enrol-password.html
index bbecd202a..48bcb4164 100644
--- a/src/core/features/courses/components/self-enrol-password/self-enrol-password.html
+++ b/src/core/features/courses/components/self-enrol-password/self-enrol-password.html
@@ -23,7 +23,7 @@
type="password"
placeholder="{{ 'core.courses.password' | translate }}"
[(ngModel)]="password"
- [core-auto-focus]
+ [autofocus]="true"
[clearOnEdit]="false">
diff --git a/src/core/features/login/pages/forgotten-password/forgotten-password.html b/src/core/features/login/pages/forgotten-password/forgotten-password.html
index 56a3aef48..b95018ee7 100644
--- a/src/core/features/login/pages/forgotten-password/forgotten-password.html
+++ b/src/core/features/login/pages/forgotten-password/forgotten-password.html
@@ -31,7 +31,7 @@
+ formControlName="value" autocapitalize="none" autocorrect="off" [autofocus]="autoFocus">
diff --git a/src/core/features/login/pages/site/site.html b/src/core/features/login/pages/site/site.html
index 7113ef2f2..cf7b45e50 100644
--- a/src/core/features/login/pages/site/site.html
+++ b/src/core/features/login/pages/site/site.html
@@ -27,7 +27,7 @@
{{ 'core.login.siteaddress' | translate }}
+ formControlName="siteUrl" [autofocus]="showKeyboard && !showScanQR">
@@ -37,7 +37,7 @@
{{ 'core.login.siteaddress' | translate }}
+ [autofocus]="showKeyboard && !showScanQR" (ionChange)="searchSite($event, siteForm.value.siteUrl)">
diff --git a/src/core/features/search/components/search-box/core-search-box.html b/src/core/features/search/components/search-box/core-search-box.html
index 7f400ffa9..7a2fcacaf 100644
--- a/src/core/features/search/components/search-box/core-search-box.html
+++ b/src/core/features/search/components/search-box/core-search-box.html
@@ -3,7 +3,7 @@