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

[#58260] use classList to be more precise

Tobias Dillmann1534b7dd88e6
diff --git a/frontend/src/stimulus/controllers/hover-card-trigger.controller.ts b/frontend/src/stimulus/controllers/hover-card-trigger.controller.ts
index 5f705eb86da..addef0756cc 100644
--- a/frontend/src/stimulus/controllers/hover-card-trigger.controller.ts
+++ b/frontend/src/stimulus/controllers/hover-card-trigger.controller.ts
@@ -69,7 +69,7 @@ export default class HoverCardTriggerController extends ApplicationController {
shouldRegisterHoverEventListeners() {
const browserSupportsHovering = window.matchMedia('(hover: hover)').matches;
// The browser on the CI claims not to support hovering, so we must detect whether we are in a test environment:
- const isTestEnv = document.body.className.includes('env-test');
+ const isTestEnv = document.body.classList.contains('env-test');
return isTestEnv || browserSupportsHovering;
}