Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Debounce focussing the filter a bit to ensure that the ActionMenu does not trap it

Henriette Dargeca5f80ac76d1
diff --git a/frontend/src/stimulus/controllers/dynamic/filter/filters-form.controller.ts b/frontend/src/stimulus/controllers/dynamic/filter/filters-form.controller.ts
index 90bb0073c75..39d77dc54c6 100644
--- a/frontend/src/stimulus/controllers/dynamic/filter/filters-form.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/filter/filters-form.controller.ts
@@ -228,9 +228,12 @@ export default class FiltersFormController extends Controller {
const target = element.querySelector(selector) as HTMLElement;
if (target) {
- target.focus();
- // We have found and focused our element, abort the iteration.
- return true;
+ window.setTimeout(() => {
+ target.focus();
+
+ // We have found and focused our element, abort the iteration.
+ return true;
+ }, 250);
}
return false;