Skip to content

Commit 0bde506

Browse files
committed
Debounce focussing the filter a bit to ensure that the ActionMenu does not trap it
1 parent f6aea3c commit 0bde506

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

frontend/src/stimulus/controllers/dynamic/filter/filters-form.controller.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,12 @@ export default class FiltersFormController extends Controller {
228228
const target = element.querySelector(selector) as HTMLElement;
229229

230230
if (target) {
231-
target.focus();
232-
// We have found and focused our element, abort the iteration.
233-
return true;
231+
window.setTimeout(() => {
232+
target.focus();
233+
234+
// We have found and focused our element, abort the iteration.
235+
return true;
236+
}, 250);
234237
}
235238

236239
return false;

0 commit comments

Comments
 (0)