diff --git a/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html b/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html index 35033669b..676ad9624 100644 --- a/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html +++ b/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html @@ -58,7 +58,7 @@ {{ 'addon.mod_lesson.enterpassword' | translate }} + [autofocus]="true" #passwordinput [clearOnEdit]="false"> diff --git a/src/addons/mod/lesson/components/password-modal/password-modal.html b/src/addons/mod/lesson/components/password-modal/password-modal.html index c09d93d0f..37ddd3fad 100644 --- a/src/addons/mod/lesson/components/password-modal/password-modal.html +++ b/src/addons/mod/lesson/components/password-modal/password-modal.html @@ -15,7 +15,8 @@ {{ 'addon.mod_lesson.enterpassword' | translate }} + [autofocus]="true" #passwordinput [clearOnEdit]="false"> + 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 @@
- @@ -10,4 +10,3 @@
- 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 @@