From cefc589c2a6641c807bacb7812ee748440cca758 Mon Sep 17 00:00:00 2001 From: Matus Kasak Date: Wed, 26 Aug 2026 08:38:38 +0200 Subject: [PATCH] fix(view-mode-switch): drop data-toggle="buttons" to stop Bootstrap null-deref on /search The search view-mode switch rendered
with routerLink children and no . On window.load, the bundled Bootstrap 4 JS runs its load.bs.button.data-api handler, which iterates [data-toggle="buttons"] .btn and reads .checked on querySelector('input:not([type="hidden"])'); with no input it dereferences null and throws an uncaught pageerror ("can't access property 'checked', s is null"), failing the Playwright consoleErrors test on /search. The attribute is semantically wrong here (there are no toggle inputs) and inert in stock ng-bootstrap DSpace; routerLinkActive/[class.active] already drive the active state, so the list/grid/detail toggle is unchanged visually and functionally. Fixes dataquest-dev/dspace-customers#931 Co-Authored-By: Claude Opus 4.8 --- src/app/shared/view-mode-switch/view-mode-switch.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/view-mode-switch/view-mode-switch.component.html b/src/app/shared/view-mode-switch/view-mode-switch.component.html index 5f70bc699ce..dfa20c41f9e 100644 --- a/src/app/shared/view-mode-switch/view-mode-switch.component.html +++ b/src/app/shared/view-mode-switch/view-mode-switch.component.html @@ -1,4 +1,4 @@ -
+