Merge branch 'autofocus-fields'

This commit is contained in:
Jan Böhmer 2026-02-15 21:36:22 +01:00
commit f024c4b09e
4 changed files with 12 additions and 1 deletions

View file

@ -5,6 +5,7 @@ export default class extends Controller
{
connect() {
this.element.addEventListener('show.bs.modal', event => this._handleModalOpen(event));
this.element.addEventListener('shown.bs.modal', event => this._handleModalShown(event));
}
_handleModalOpen(event) {
@ -61,4 +62,8 @@ export default class extends Controller
amountInput.setAttribute('max', lotAmount);
}
}
_handleModalShown(event) {
this.element.querySelector('input[name="amount"]').focus();
}
}