From fa6fc972076f521274a555e089103f24e00fc9a6 Mon Sep 17 00:00:00 2001 From: Michael Chadwick Date: Wed, 14 Oct 2026 17:14:21 -0700 Subject: [PATCH 1/3] augment SearchBox component to take optional focus/focusout event handlers --- app/components/search-box.gjs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/components/search-box.gjs b/app/components/search-box.gjs index fd57f65f05..9ea785480c 100644 --- a/app/components/search-box.gjs +++ b/app/components/search-box.gjs @@ -70,6 +70,20 @@ export default class SearchBoxComponent extends Component { } } + @action + focus() { + if (this.args.focus) { + this.args.focus(); + } + } + + @action + focusOut() { + if (this.args.focusout) { + this.args.focusout(); + } + } + searchTask = task({ restartable: true }, async () => { this.moveFocus(); await timeout(DEBOUNCE_TIMEOUT); @@ -87,6 +101,8 @@ export default class SearchBoxComponent extends Component { maxlength={{this.maxlength}} {{on "input" this.update}} {{on "keyup" this.keyUp}} + {{on "focus" this.focus}} + {{on "focusout" this.focusOut}} />